Developer forum

Forum » Feature requests » Automatic Query and Facets creation for New Index

Automatic Query and Facets creation for New Index

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Guys,

I am thinking about this for a while already. I will be touching a series of features with this request, feel free to split them if you think it's useful. Right now, I see them as a whole.

The use case that triggered this request is ecommerce shop with Product Category Fields (see problem.jpg).

In the previous Index method, the shop admin could manage all aspects of the Search Filters from Product Category Fields creation to the definitions of the Search filters. What goes where and how it is displayed.

With the introduction of the New Index, these tasks are more prone to errors if the Admin is not careful on how to define them.

That's why I think we need a way to allow the admin to manage them as before.

One simple way that I could think of, is to add a checkbox next to the Field when it is defined in a Product Category (see image1.jpg). BAsed on my Image, this checkbox will suppose to add the Material field to the Query and Create a Facet Group called "Accesorii chei si carduri" with a Facet called Material.

This approach will solve the problem of displaying the right facets for the right Product Groups (in case one product inherits product category fields from different Product Categories) and also the interface problem when trying to select an Attribute in the Query (see Image2.jpg) when the attributes have identical names (that's actually another feature request that should be handled separate from this current request. The name of the product Category should be added next to the Field Name or they should be displayed grouped as they are on the Search Filter Definition. See Image3)  

Another solution would be to use the Search Filter interface and let the user define them as they previously did and just create the necessary Query and Facets files.

This solves the above issues and is also easing the transition to the New Index for solutions that are already using the Old Index and Search Filters.

Of course, there might be other implications of this as to what happens if a user manually edits the query or the facets after they have been automatically defined. But I am sure you can find ways of dealing with the technical solutions.

We have already played a bit with the automatic generation of the files using the methods and functions already implemented, and  I know Nuno and his team have started something similar, but the fact that this change requires the use of some functions that are not public and also make some changes to the interfaces, makes me think this is better to be dealt with as a core functionality rather than a custom development.

It would be nice to hear the opinion of other partners and users but based on the history so far, I do not have high hopes this will happen. Therefore it's up to you to decide if this worths the effort or not. One way or the other, we will need to find a way to solve it for our projects if we want to move to the new index and keep the admins happy.

Thank you,
Adrian

 

Image1.jpg Image2.jpg Image3.jpg problem.jpg

Replies

 
Nicolai Pedersen
Reply

Hi Adrian

I agree that the creation of facets could be simplified quite a bit - we are already looking into that in another context. A simplified user interface to define facets and setup the queries and facet definitions used would be a great feature. But it will not be following the old approach or your suggestion - because of a lot of technical things. The new index knows nothing about Ecommerce unlike the old index. Your suggestion and the old implementation have lots of problems i.e. in scenarios where you have more than one search etc.

Instead I suggest an approach where you have one screen, in repositories or in MC->Ecommerce, called "Define facets". That will give you a complete list of fields, pretty much like the one you have in Advanced Configuration -> Fields in MC. In that screen, you can define which fields should have facets but also if you want it to be a "Match any" (Checkbox list where either selected option must apply), a "Match all" (Checkbox list where all selected options must apply) or a "Equal" (Radio button), and maybe other 'types' as well. The type will define how the parameter, criteria and facet will be setup - and maybe also add fields to the index it self to make sure things works right (Analyzed vs. not analyzed). It might also include additional rendering information that could help simplify facets rendering.

Your other issue with the same field many times is because you implement "wrong". If a field is present in many product categories, it should be a product field instead. In this case it seems you have the field "Capacitete" once for each category. A product being member of 2 groups, would have the field twice with different value - probably not the wanted behavior? Anyways, added the grouping of fields as TFS#29172.

BR Nicolai

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

That's great news. My suggestion was based on the old functionality because I thought it's gonna be easier to implement. I agree that a completely new approach is idea and I am looking forward to it. Do you have any estimate on which version will it be available on? Will it be available for both 8 and 9 branches?

As for my implementation, let's agree to disagree. A product field will make sense if the field applies to ALL or MOST of the product categories. In my case, the field applies to some product categories and the meaning of it is different based on the ProductCategory although the name is identical (different values at least). And I had to use the same name bacause of the way it is displayed. Of course, I can always use the Translation to transform the name of the field but this will add a lot of work on the admin part and it might also have an impact on performance with a large translation file and a lot ofd translation requests. (of course, this is an assumption, not a fact yet).

Anyway, I think the new facets interface will simplify things a lot.

Looking forward to it.

Thanks,

Adrian

 

 

 
Nicolai Pedersen
Reply

Hi Adrian

Regarding implementation, I do not think we disagree - it just looked like it was in most of your product categories and was covering the same thing. But you also had 9 pages of categories :-).

TFS#29172 has been added for 9.2 and the new Facet interface will be in a release after that (9.2.1 or something like that).

We do not add that many features to DW8 going forward - in this case the new index already received a lot of other new features in DW9.2 branch and we can no longer make an easy merge back to 8 branch.

BR Nicolai

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

You are right. We have the same approach and you couldn't know the setup. I am sory about that.

It makes sense to focus more on the DW9 branch, I was expecting it. I just wanted to make sure that we need to move to DW9 as soon as possible all of our projects.

It's gonna take some effort but it will worth in the end.

Thank you,
Adrian

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

Any news on this subject?

Thanks,

Adrian

 
Nicolai Pedersen
Reply

29172 has been released with 9.2

Changing the facets definitions is still on the plan - but due to changes in the index because of PIM, it has to wait a little.

BR Nicolai