Let's say I have an index in ElasticSearch 6:
"mappings" : {
"pet" : {
"name" : {
"type" : "text"
},
"info" : {
"type" : "text"
},
"description" : {
"type" : "text"
}
}
}
I need to perform full-text search by all fields with the same input string that is typed by user: 'big grey dog' or 'small cute cat'. How can I up in relevance search those units, which contain more words from input. No matter where - name or description. I want that unit:
{
"name" : "big",
"info" : "grey",
"description" : "dog"
}
have higher score then unit:
{
"name" : "grey dog",
"info" : "dog dog grey dog",
"description" : "grey dog grey dog grey dog"
}