Developer forum

Forum » CMS - Standard features » Facets and queries with multiple comma values

Facets and queries with multiple comma values

Jannich Ariyanayagam
Jannich Ariyanayagam
Reply

Hi Dynamicweb,

im having issues with multiple seleceted comma values in a facet, atm. all the comma values are splitted in the facet list even when i use the datatype String. i have tried restarting the app pool to see if it was server caching even resetted the query parameters in the ecommerce module on the product list page in the content section nothing really helped.

what im trying to accomplish works just fine with normal values "Values without comma" (see attachment "multiselect") but as soon as i have a comma values in the facet it just splits everything up on the comma and gives me 0 products or too many products like if i choose "5" it brings up everything that has ",5" (see attachment "diametercomma2").. 

what am i doing wrong? i even formatted the value with brackets like [3,5].

diametercomma2.png multiselect.png

Replies

 
Jannich Ariyanayagam
Jannich Ariyanayagam
Reply

here are attachments for my setup at the movement.

expression.png facet.png Field.png Parameter.png
 
Steffen Kruse Hansen Dynamicweb Employee
Steffen Kruse Hansen
Reply
This post has been marked as an answer

Hi Jannich,

We have a bug in the Lucene-engine regarding facet options containing comma (e.g  [3,5]), and I know that NoZebra have created a Support-Case on that, and should have received a dll with a fix. I don't know if it's you who have received the dll, but if not this could be the cause of your problem.

If you already use the new dll, my quess is that it's your setup in the query, which are causing you problems. When you use 'Equal' you will compare all options to one option, and since it's a string, you'll have something like 'Option1' = 'Option1' AND 'Option1' = 'Option2'

If you change the operator to 'In', I would expect it to work, because then it would check like:

'Option1' = 'Option'1 OR 'Option1' = 'Option2'

But of cause it depends on exactly what you want to achieve.

I hope it helps

Best regards,

Steffen

 

Votes for this answer: 2
 
Jannich Ariyanayagam
Jannich Ariyanayagam
Reply

Hi Steffen,

It works like a charm, thanks alot for the answer!

 

You must be logged in to post in the forum