Developer forum

Forum » Ecommerce - Standard features » facets with comma in string values.

facets with comma in string values.

Jonas Krarup Dam
Reply

We are seeing a problem when using the index:
When we have a field of type String, and it contains values with a comma (in this case, it's numbers, so "1,2", "4,5"), and we are using a facet with type Checkbox, and a parameter in the query with type String[], it breaks.


Basically, it looks like DW  tries to split up the strings on the commas when selecting wich facet values to filter on, even though they are url-encoded when sent as parameters in the url, which results in no facets being selected, and no products or wrong products being shown.

Have anyone else had problems with this? are we fucking up, somehow?

Thanks, Jonas


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

By default multiple values in http is handled using , - så that is breaking it. So you can try to URL encode the commas (probably will not work) or use the other format created for the situation:

Try this format: parameter=[12,23][456,67][etc,someother] 

BR Nicolai

Votes for this answer: 1
 
Jesper Holm Damgaard
Reply

Url encoding does not fix the issue, but the other format using [] seems to work.

Thanks, Jesper

 

You must be logged in to post in the forum