We frequently see pmrs related to the number of facet values on the storefront not equal to what you are expecting. In the majority of these pmrs the solution is developing a better understanding of what happens behind the scenes.
Let's take a look at the following example:
In this example, my MAX_DISPLAY field for facet: ads_f12001_ntk_cs is set to 2 and the ZERO_DISPLAY is set to 1
Enable foundation tracing ( com.ibm.commerce.foundation.*=all) and in the solr query you will see the following the following being passed:
(One thing to note here is that zero_display = 1 in the FACET table equals facet.mincount=0 in the solr query.)
What this says is" give me the first 2 facet values for facet ads_f12001_ntk_cs as long as the facet count is greater than or equal to zero."
In the solr response for this query you can see what solr sends back if you look for the term "facet_fields=". This section of the solr response will list out all returned facets, their values and the counts. Once you find the section, look for the facet in question. You will see something like this:
There are the 2 facet values we asked for. However, since the one has zero count, it will not be displayed on the storefront. Hence the question- Where are my facets values?
To get the facet values to display on the storefront, you have two options:
1. You can set the MAX_DISPLAY = -1 to pull back all facet values
2. If you really only want 2 facet values returned, you can update the ZERO_DISPLAY to 0.
Setting zero_display = 0 in the FACET table will set the facet.mincount=1 in the solr query.
If you change the changing max_display=-1 you will see the following returned by solr:
If you change zero_display= 0 you will see the following returned by solr:
In both cases for this example you will only see the 4GB and 6GB facet values on the storefront because we only have four facet values set up and two of them are zero count, but as you can imagine on a grander scale the MAX_DISPLAY and ZERO_DISPLAY setting could significantly impact what you see on the storefront.