Developer forum

Forum » Ecommerce - Standard features » Facet options for fields with many values

Facet options for fields with many values

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I am trying to create a facet based on the ProductName field.

This Facet will be part of a series of facets (it will be the last one) and all facets will apply to Variants.

When I define the Facet, I get a warning because of the number of values (because it counts the entire catalog).

In my case, the first facet will restrict the list to ~30 products which should render no more than 5 values for the ProductName Facet.

However, I always get ) for the FacetOptions count.

Does this have anything to do with the number of values warning?

We are using 9.14.10.

Thank you,
Adrian

 


Replies

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

Hi Adrian

Facets are not calculated based on the search result, but based on the index. Facets are calculated based on terms in the entire index, and then options with 0 results in the current search resulkt will be filtered out.

Creating a facet on the product name field is not a good idea unless you have a maximum of around 250 products, hard limit 2048 terms. You will run into performance issues and potential exceptions.

If you have e.g. less than 100 products in a search result, you can make a faux facet in the razor template based on the products.

BR Nicolai 

Votes for this answer: 1

 

You must be logged in to post in the forum