Hi All,
I'm attempting to use the significant_text aggregation with a field that is stored as a text field and analyzed via the english analyzer but I'm having an issue where no buckets are being returned.
I'm essentially using the documented basic use example.
Here is the query I'm using:
GET my_index/_search
{
"query": {
"match": {
"Comment.english": "pay"
}
},
"aggs": {
"keywords": {
"significant_text": {
"field": "Comment.english"
}
}
}
}
However, the output always returns zero buckets:
{
"took" : 46,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : {
"value" : 2694,
"relation" : "eq"
},
"max_score" : 3.9885752,
"hits" : ...,
"aggregations" : {
"keywords" : {
"doc_count" : 2694,
"bg_count" : 21936,
"buckets" : [ ]
}
}
}
Would anyone have any ideas on why this is happening?
If I change the field to use the keyword version Comment
it somewhat works, as it returns buckets, but it acts exactly like the significant_terms
aggregation as it returns the keyword value rather than the individual analyzed words.
This also doesn't make much sense as in the docs for the significant_text aggregation it says its intended for text
fields:
- It is specifically designed for use on type
text
fields
Additional Information:
- Elasticsearch Version: 7.14.1