Developer forum

Forum » Ecommerce - Standard features » Facet options split string value

Facet options split string value

Kasper Legarth
Reply

Hello.

Our customer have different location for some of their products. This field is a categoryfield that is filled with information from BC.
I'm building product list where this is a facet option. There are in total three different values. But the facet options is each word in the different values. I have gotten my self a tunnel vision, what am i missing here?




Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

How is the value stored on the product?

Is it "Location 1, Location 2, Location 3"?

When you create the field in the index, you can do 2 things - either make the field 'Analyzed' or create the field as a string[] (array).

If the values you have in the field on the product is "location1, location2, location3), you can analyze the field in the index and it will become a facet of three options "location1", "location2", "location3".

Otherwise index it as a string array - then if you have values like "Location 1, Location 2, Location 3" it should be indexed as 3 different values on the same field - and then it should not be analyzed.

 
Stephen Anthony Jackson
Stephen Anthony Jackson
Reply

You have to create a non analyzed index for that field and base the facet on that

instead. I have usually taken the name of the field and added "_NA" (not analyzed) to it for the index name.

 
Kasper Legarth
Reply

Hi Nicolai.

It is a productschemaextender field. I think my knowledge is a little short here. How do change the field to be not analyzed?
- I see that all my string fields are analyzed.

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

The schema extender is one we create - and control.

So you have to add your own version of that field to the index with the required settings. You can see how to do that here: https://doc.dynamicweb.com/documentation-9/repositories/indexing/custom-fields

Votes for this answer: 1

 

You must be logged in to post in the forum