Hi everyone.
I have an index wich consists of 3 fields:
sys_name
full_name
man_id.
I want to search by full name wich consists of 3 words:
GET managers/_search
{
"query": {
"match": {
"full_name": "William Garvey Johnson"
}
}
}
but the result set have only one of the words above (Johnson).
What query should I use to have a match of all three words of a full name?
My mapping of an index:
PUT /managers
{
"settings": {
"index": {
"max_ngram_diff": 30
},
"analysis": {
"analyzer": {
"autocomplete": {
"tokenizer": "autocomplete",
"filter": [
"lowercase"
]
},
"autocomplete_search": {
"tokenizer": "standard",
"filter": [
"lowercase"
]
}
},
"tokenizer": {
"autocomplete": {
"type": "edge_ngram",
"min_gram": 1,
"max_gram": 30
}
}
}
},
"mappings": {
"properties": {
"man_id": {
"type": "long",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"sys_name": {
"type": "text",
"analyzer": "autocomplete",
"search_analyzer": "autocomplete_search",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"full_name": {
"type": "text",
"analyzer": "autocomplete",
"search_analyzer": "autocomplete_search"
}
}
}
}