I am having problems with fuzzy queries giving higher relavance to the fuzzy hit term than the direct match. I dont understand why - even after having rtfm.
- Creating a new index
curl -XPUT http://192.168.178.40:9200/test_test_test
- Inserting to entries
curl -XPUT http://192.168.178.40:9200/test_test_test/test/1 -d '{ "name": "nike" }' curl -XPUT http://192.168.178.40:9200/test_test_test/test/2 -d '{ "name": "bike" }'
- Querying for search term "bike"
curl -XPOST http://192.168.178.40:9200/test_test_test/test/_search -d '{ "query": { "match": { "name": { "query": "bike", "fuzziness": "1" } } } }' | jq
This gives a result with nike having higher relevance than bike. Why is that and how can this be fixed?