Developer forum

Forum » Swift » Facet not working

Facet not working

Justin Sjouw Dynamicweb Employee
Justin Sjouw
Reply

On this website http://melgers.cloud.dynamicweb-cms.com/bier

I added some facets, but might have done something wrong. I compared it to another Swift install but I still can't find it.

When you click a facet (other than sorting) the page is refreshed and the selected products change, but they do not match the filter.

The selection is not preserved, and the "Selected Facets" component is not shown with the selected facet.


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Justin

I think it is related to the facets that might be numeric fields?

We have just had a fix on that on the latest Dynamicweb.Indexing.Lucene provider. So try to upgrade that.

You can also index the fields into a string field instead and use that as a facet.

BR Nicolai

Votes for this answer: 1
 
Justin Sjouw Dynamicweb Employee
Justin Sjouw
Reply

Changing to String worked indeed. I think I will need to change it to the new updated indexer because the filter should be a range actually. 

Is there a way I can make a sort of grouped Facet, so I can come close to a range (slider). For instance I would like to define a list like this:

  • 0-5  (Selects all items with a value between 0-5)
  • 5-10 (Selects all items with a value between 5-10)

If that's possible it will be a bit easier (and acceptable for now) than building a slider control in teh frontend...

BR Justin

 

 
Nicolai Pedersen
Reply
This post has been marked as an answer

You can create a grouping field on the index:

https://doc.dynamicweb.com/documentation-9/repositories/indexing/custom-fields#4785

Votes for this answer: 1

 

You must be logged in to post in the forum