Dear all,
What is the difference between a context suggester like this (NOTE that user_location path field must be a TEXT field -> is this intended???)
GET re_ab_callreports_new/_search
{
"_source": "false",
"size": 0,
"suggest": {
"my_sugg": {
"prefix": "zhon",
"completion": {
"field": "company_suggestion",
"size": 10,
"contexts": {
"user_location": "CN"
}
}
}
}
}
and a simple search query, that gives different results but still feels like a context suggester:
alternative suggestion by search query
GET re_ab_callreports_new/_search
{
"size": 0,
"query": {
"bool": {
"must": [
{
"match_phrase_prefix": {
"Company": "zhon"
}
}
],
"filter": {
"term": {
"Country.keyword": "CN"
}
}
}
}, "aggs": {
"my_agg": {
"terms": {
"field": "Company.keyword",
"size": 10
}
}
}
}