Hello Mark,
Please find an example below:
-
Document mapping:
PUT indexname
{
"mappings": {
"customers": {
"_all": {
"enabled": false
},
"properties": {
"info": {
"type": "nested",
"properties": {
"name":
{
"type": "string",
"index": "not_analyzed",
"doc_values": false,
"norms": {
"enabled": false
}
},
"type": {
"enabled": false
}
}
}
}
}
}
} -
Example doc:
{
"hits": {
"total": 1,
"max_score": 1,
"hits": [
{
"_index": indexname
"_type": "customers",
"_id": "101",
"_source": {
"info": [
{
"type": "V",
"name": "tramp"
},
{
"type": "a",
"name": "donaldo"
},
{
"type": "b",
"name": "presiden"
}
]
}
}
]
}
} -
Example query:
Provided in the above post.
As mentioned, the info.name field is not_analyzed.
While searching, I want to provide multiple values/terms with fuzziness 1.
Ideally, the above query execution should return all the 3 values that I have stored, but it doesn't.
I want to know if there is any other query or mechanism, where we can search for multiple terms together on a not_analyzed field with a fuzziness of 1.