elasticsearch ngrams results are wrong elasticsearch ngrams results are wrong elasticsearch elasticsearch

elasticsearch ngrams results are wrong


I get correct results when i use "minimum_should_match": "100%" while querying.

GET /my_index/my_type/_search{    "query": {        "match": {            "name": {                "query":    "raman r",                "minimum_should_match": "100%"             }        }    }}


Gave me better result although ranking is not right:

{   "took": 4,   "timed_out": false,   "_shards": {      "total": 1,      "successful": 1,      "failed": 0   },   "hits": {      "total": 2,      "max_score": 2.6631343,      "hits": [         {            "_index": "my_index",            "_type": "my_type",            "_id": "2",            "_score": 2.6631343,            "_source": {               "message": [                  "2,raman,23"               ],               "@version": "1",               "@timestamp": "2015-06-02T13:07:18.041Z",               "type": "my_type",               "host": "shubham-VirtualBox",               "path": "/home/shubham/sample.csv",               "id": "2",               "name": "raman",               "age": 23            }         },         {            "_index": "my_index",            "_type": "my_type",            "_id": "10",            "_score": 1.8003473,            "_source": {               "message": [                  "10,raman ram,43"               ],               "@version": "1",               "@timestamp": "2015-06-02T13:11:03.455Z",               "type": "my_type",               "host": "shubham-VirtualBox",               "path": "/home/shubham/sample.csv",               "id": "10",               "name": "raman ram",               "age": 43            }         }      ]   }}


Don't know whether this approach is correct or not but do tell me if any alternative is there for this