Context Suggester combinations

Continuing the discussion from Context Suggester contexts are filtering with OR instead of AND?:

Has any one tried the option as mentioned in https://github.com/elastic/elasticsearch/pull/26407#issuecomment-326771608. - I am not able to get it. Can some one please help me understand/explain how will this work - "It's possible to work around this by creating additional pseudo contexts when indexing and querying that instead (e.g. if you have contexts x and y and need to sometimes match both, then also create a context x_y and query that instead when you need to match both, using x and y only when you need to match one or the other)."

Sorry for delay in response but i figured the way.. its simple..
"city_suggest": {
"type": "completion",
"analyzer": "simple",
"preserve_separators": true,
"preserve_position_increments": true,
"max_input_length": 50,
"contexts": [
{
"name": "city",
"type": "CATEGORY",
"path": "city"
},
{
"name": "state",
"type": "CATEGORY",
"path": "state"
},
{
"name": "city_state",
"type": "CATEGORY"
}
]
}

you will manually populate city_state

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.