My document’s field looks like this.
“ancestors.code”:[“AS”, “307756”],
I want to bring it if it contains “AS”.
I’m not sure if this is possible.
If possible, I don’t know what “query type” is possible. “match” and “terms” didn’t work.
My document’s field looks like this.
“ancestors.code”:[“AS”, “307756”],
I want to bring it if it contains “AS”.
I’m not sure if this is possible.
If possible, I don’t know what “query type” is possible. “match” and “terms” didn’t work.
Hi @horoyoi_o,
I think there are a couple of issues here.
Try,
regards,
I do not understand. The other thing I run in exactly the same way as this works fine.
for example
“ancestors”: {
“dynamic”: true,
“enabled”: true,
“properties”: {
[
“country_code”: {
“dynamic”: false,
“enabled”: true,
“fields”: [
{
“analyzer”: “keyword”,
“include_in_all”: true,
“include_term_vectors”: true,
“index”: true,
“name”: “country_code”,
“store”: true,
“type”: “text”
}
]
},
I can get ancestors.country_code like this
{
“field”: “ancestors.country_code”,
“match”: “KR”
}
it works. what’s the difference between them?
Is the keyword analysed country_code
an array field like earlier?
Keyword analyser wouldn’t apply any text analysis, rather keeps the input field content as it is.
So search for “KR” would work.
If you have any further queries, plz share the complete index definition and a sample document which you want to work on?