Search code examples
solrdatastaxdatastax-enterprisefacet

Show null values in facet.pivot


I sent a Solr group query like

group=true&group.field=colorid

Some of the records are not assigned colorid and so they all are returned as null along with the count. Now I have a pivot query like

facet=true&facet.pivot=colorid,featureid

This query does not returns me the count of the null colorids. Any help as to how can I get those?


Solution

  • Try using

    facet.missing=true

    It should show all the null values as one facet.

    https://cwiki.apache.org/confluence/display/solr/Faceting#Faceting-Thefacet.missingParameter