3
votes

I have an index where some documents are missing a value I am faceting on. When I run my query, no matter what I do, I get back a count with a blank label for the documents which were empty.

I'm using solrj to query and receive XML back where the element for the empty facet field is present - for example

I do not want to have a a facet count returned back for these empty fields. I've tried setting facet.missing=false but I still have the count returned.

Does anyone know how to stop this through Solr? I really want to avoid putting in any logic into my views and to avoid any overhead there is for Solr when counting these.

Thanks

2

2 Answers

5
votes

Try to add facet.mincount=1. That will only display facets with a value greater than 1.

0
votes

For future readers: https://stackoverflow.com/a/24740431/2039709 (include the facet fields as non-empty in your query)