I want to perform both exact word match and partial word/sub string match. For example if I search for "test product" then I should be able to find "test" and "product" related text in the result. Am searching elastic search with the below match query, which is not giving me the exact match instead its giving some more irrevalant match also.Example it's give "sample" related text in the result.
am using elastic search 6.3
Please find my query below
GET /_search { "must":{ "query_string":{ "query":"title:test product" } } }
Search Result: "hits": [ { "_index": "67107104", "_type": "_doc", "_id": "1", "_score": 0.6931471, "_source": { "title": "testing" } }, { "_index": "67107104", "_type": "_doc", "_id": "2", "_score": 0.6931471, "_source": { "title": "product good" } }, { "_index": "67107104", "_type": "_doc", "_id": "3", "_score": 0.6931471, "_source": { "title": "sample" } } ]
Expected Search Result:
"hits": [ { "_index": "67107104", "_type": "_doc", "_id": "1", "_score": 0.6931471, "_source": { "title": "testing" } }, { "_index": "67107104", "_type": "_doc", "_id": "2", "_score": 0.6931471, "_source": { "title": "product good" } } ]