Drupal Search API facet block not listing all indexed fields I have a content type that has a term reference field to a vocabulary called 'Categories'.

Categories

- Cat 1
- - Cat 1.1*
- - Cat 1.2
- - - Cat 1.2.1
- - - Cat 1.2.2*
- - Cat 1.3
- Cat 2
- Cat 3
- - Cat 3.1
- - - Cat 3.1.1
- - Cat 3.2


As you can see, the Category vocabulary has a terms in a Hierarchy.

Using Search API and Solr, im indexing the term reference field using 'Parents All'. I have set the index up to index the hierarchy.

Its all working perfectly, however, not all terms are listed in the facet box, despite the products being indexed correctly. There are a few terms that do not appear. (marked with a * above).

However, I know that the nodes are indexing correctly. I know this as I can filter by a facet that is working, then swap the argument in the URL arguments for the TID of a term that isnt working. When this happens, the products are displayed correctly in the view.

So my question is...what could cause Drupal/Search API to not display all items in a facet.

How can I start to debug this?

I have tried rewriting the facet using this function:

function HOOK_facet_items_alter(&amp;$build, &amp;$settings) {
                        if ($settings-&gt;facet == "YOUR_FACET_NAME") {
                          foreach($build as $key =&gt; $item) {
                            $build[$key]["#markup"] = drupal_strtoupper($item["#markup"]);
                          }
                        }
                      }


However, when I print out the list of terms inside $build the ones that arn't displaying are not listed in the array.

ANy help or any other hook suggestions are greatly appreciated.
Turns out that I had a limit on the number of items to display.

To fix it, I had to change the limit under Facet > Display.