I've an Elasticsearch-7.8.1 running in 3-node cluster setup. I use a match query on fields along with phrase suggester for querying the documents across multiple indices.
Now coming to the problem, whenever I use the above mentioned match query to search for a matching document with exact spelling of the document which is present in my elasticsearch the phrase suggester part shows me some random suggestion and the suggestion that I get is intermittent for same input text.
For eg,
Lets say I have some 3-4 documents indexed like Bills, How do I do Bill Pay ,What is the status of Bill payment, What are the benefits of bigger Bill payments ?
My query is as follows:
GET idx-name1,idx-name2/_search
{
"query": {
"bool": {
"should": [
{
"match": {
"field1": "bill pay"
}
},
{
"match": {
"field2": "bill pay"
}
}
]
}
},
"suggest": {
"text": "bill pay",
"YOUR_SUGGESTION": {
"phrase": {
"field": "field1"
}
}
}
}
Output:
I intermittently get suggestion as "bigg pay" in phrase suggester part.
Please help me, this is acting as a barrier for me in creating 'Did you mean functionality ?'
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…