0

I'm working on implementing search functionality on a website, and I'm using Solr for this. Everything works fine, but I've got a little trouble with the facet.missing parameter for a field.

The field may have the values A, C or simply just null. That is, the field is present on all documents, but when there is no value then the value is null.

With regards to the facet.missing parameter, the documentation says "[...] a count of all matching results which have no value for the field [...].". However, what does "no value" mean? Does it mean that the field is not present on the document at all? Does it consider null, an empty string and/or something else to be "no value"?

As it is right now, null does not seem to be a "no value" as facet.missing does not exclude the count for documents where the field value is null. However, I'd like to hear if someone has more insight on this?

sbrattla
  • 5,274
  • 3
  • 39
  • 63
  • No Value means the field was not populated for that Document. So If you query the document with facets enabled, the facets would not be returned for this document. Even if the value is blank it will be considered as No value. Are you adding null as a String to the document ? What is the facet value returned for the field when you query for the document ? – Jayendra Nov 01 '12 at 10:13
  • I'm indexing documents using SolrJ, and i set the value to null (as in Java null, and not the String "null"). The facet value returned is '_empty_' (using the solr-php-client). – sbrattla Nov 01 '12 at 10:26

0 Answers0