Hi, I'm using version 6.8.
How to configure the search to prioritize products that have the search term in ascending order? For example, when typing the word "oil" (cooking oil) I want the search result to prioritize products that have the first word searched. What is happening is that the result returns products without order that have the search term at the beginning, in the middle and at the end, attached.
This my index settings:
{
"number_of_shards": 1,
"number_of_replicas": 0,
"analysis": {
"analyzer": {
"std": {
"tokenizer": "standard",
"char_filter": "html_strip",
"filter": ["standard", "elision", "asciifolding", "lowercase", "length"]
},
"keyword": {
"tokenizer": "keyword",
"filter": ["asciifolding", "lowercase", "length"]
},
"keyword_prefix": {
"tokenizer": "keyword",
"filter": ["asciifolding", "lowercase", "edge_ngram_front"]
},
"text_prefix": {
"tokenizer": "standard",
"char_filter": "html_strip",
"filter": ["standard", "elision", "asciifolding", "lowercase", "edge_ngram_front"]
},
"text_suffix": {
"tokenizer": "standard",
"char_filter": "html_strip",
"filter": ["standard", "elision", "asciifolding", "lowercase", "edge_ngram_back"]
}
},
"filter": {
"edge_ngram_front": {
"type": "edgeNGram",
"min_gram": 1,
"max_gram": 20,
"side": "front"
},
"edge_ngram_back": {
"type": "edgeNGram",
"min_gram": 1,
"max_gram": 20,
"side": "back"
},
"length": {
"type": "length",
"min": 1,
"min_subword_size": 1
}
}
}
}