I am fairly new to Elasticsearch, but managed to produce results, almost to what I expect them to be, except one small problem. I am showing only the code that focuses on the issue. Using edgeNGram
as a filter:
filter: {
'type':'edgeNGram',
'max_gram':10,
'min_gram':3,
'side': 'front',
'minimum_should_match':'100%'
}
So, the results come out as expected, however I don't get any results for words smaller than 3 characters long. 3 characters longs give fairly good results, but 2 characters breaks the results, giving a lot of irrelevant results.
Essentially, what I would like is to use edgeNgram for 3 characters long, but also search for 2-character-long terms.
Looking forward to your suggestions!