Developer forum

Forum » CMS - Standard features » Facet value with space

Facet value with space

Lars Larsen
Reply

Hi

I have an index with some facets which are used for some filters in the frontend. Values that contains a space are indexed as different values. For example these values:

"Level 1
"Level 2"

are indexed as "1", "2" and "Level"! How can I prevent that?


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Lars

It depends on if the field is analyzed or not. Are you using the ProductIndexSchemaExtender or have you mapped the fields yourself?

You want your fields not to be "analyzed" - see dump.

So if your field comes from the schemaExtender, add it to the index one more time, and do not mark it for analyzed.

BR Nicolai

Capture.PNG
 
Lars Larsen
Reply

Hi Nicolai

I use the ProductIndexSchemaExtender. But I can't make it work! It's a product field defined in MC as show in the first image below. And the second image show the definition of the field after I have added it. But the values in the filter in the frontend are still the same (I have rebuilded the index).

Capture.PNG Capture2.PNG
 
Nicolai Høeg Pedersen
Reply

Hej Lars

Har did you mark it for "Analyzed"?

Did you change your facet to look at the new field?

Otherwise I need a link.... It works, I have it running on my local solution..

BR Nicolai

 
Lars Larsen
Reply

Hi Nicolai

No, I did not mark it for "Analyzed". And yes the facet includes the field "ProductSecurityLevel". I will send you an e-mail with a link to the solution.

Thanks,
Lars

 
Þórhallur Hálfdánarson
Þórhallur Hálfdánarson
Reply

Hi Lars/Nicolai (and others!)

I'm experiencing this problem with DW 9. I did create a new field on the index (see below) and used that in the query/facet instead, but that came out just like the original one (works, but all 4 values are there).

Any pointers?

Best regards,

Tolli

 
Þórhallur Hálfdánarson
Þórhallur Hálfdánarson
Reply

A collegue pointed out that we're after the NOT analyzed, I misread that in the previous answer. :) Works like a charm now!

-Tolli

 

You must be logged in to post in the forum