Skip to content

Instantly share code, notes, and snippets.

@merrellb
Created February 23, 2011 23:31
Show Gist options
  • Save merrellb/841428 to your computer and use it in GitHub Desktop.
Save merrellb/841428 to your computer and use it in GitHub Desktop.
Empty strings in facets.
{"query": {"match_all": {}}, "facets": {"family": {"terms": {"field": "family", "size": 1000000}}}, "fields": []}
in the response I get back a massive list of term facets, one of which is {u'count': 242, u'term': u''} in a addition to a "missing" field with the number 4604 (which matches up with the number returned when executing a missing query on the same field)
My questions are:
1) Why does empty-string appear as a facet if it is synonymous with missing?
2) Are the 242 empty-string facets included in the 4604 "missing"?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment