I have a nested field with possible values of "yes", "no", "maybe". It is
type "string", not analyzed. When I ask for facet counts for this field
(terms facet), I get back counts for "yes" and "maybe", and then the count
that I would expect for "no" is in the missing count, instead of in the
terms list. It is acting like "no" has some type of special handling or
behavior. I am unable to find any reference to a special behavior like
this in the docs. Is there some way to get the value "no" to behave
normally?
I tested that it works fine to have "no" in a non-nested field, so it seems
to be specific to nesting.
data (python code):
[{
'id' : 1,
'recommendations' : [{
'username' : 'user0',
'recommendation' : 'yes',
}]
},
{
'id' : 10,
'recommendations' : [{
'username' : 'user0',
'recommendation' : 'no',
}]
},
{
'id' : 7,
'recommendations' : [{
'username' : 'user0',
'recommendation' : 'maybe',
}]
},]
query:
{
'query': {
'match_all': {}
},
'facets': {
'recommendations': {
'terms': {
'field': 'recommendations.recommendation',
'size': 10},
'nested': 'recommendations'
}
}
}
facets in the results:
'facets': {
'recommendations': {
'_type': 'terms',
'total': 2,
'terms': [{
'count': 1, u'term': u'yes'
}, {
'count': 1, u'term': u'maybe'
}],
'other': 0,
'missing': 1
}
}
Thanks for any help!
Nathan
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/d7a703e3-3ee6-41fe-971b-8485c83a52d3%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.