That is what I have Done:
First:
curl -X PUT "localhost:9200/log_20180419"
Second
curl -X PUT "localhost:9200/log_20180419/_mapping/_doc" -H 'Content-Type: application/json' -d' { "properties": { "title": { "type": "text", "norms": false } } } '
Third
#I insert data with python client : elastisearch-py from elastisearch import Elastisearch es_conn = Elastisearch() content_tmp = "acxzcasiuchxzuicbhasuicgzyugas%s" for i in range(10000): result = content_tmp % i es_conn.index(index="log_20180419", body = {"title":result}, doc_type="_doc")
Forth
I Query It
curl -X GET "localhost:9200/log_20180419/_search?pretty" -H 'Content-Type: application/json' -d' { "query": { "match":{ "title":"dasuioczxuivcaduciqanbcaiushcauinhauincsaincdjkxzcbyquiwbjkfcznkajsbcjkzxhcuiasbcjkzxchjdsfasckjbjak9999" } } } '
Result is
{ "took" : 1, "timed_out" : false, "_shards" : { "total" : 5, "successful" : 5, "skipped" : 0, "failed" : 0 }, "hits" : { "total" : 1, "max_score" : 7.2293553, "hits" : [ { "_index" : "log_20180419", "_type" : "_doc", "_id" : "oDR99mIBBZEcRu0i7LlO", "_score" : 7.2293553, "_source" : { "title" : "dasuioczxuivcaduciqanbcaiushcauinhauincsaincdjkxzcbyquiwbjkfcznkajsbcjkzxhcuiasbcjkzxchjdsfasckjbjak9999" } } ] } }
You can see, it still has _score file in result, I get Confuse with it ?
The Doc is here norms | Elasticsearch Guide [8.11] | Elastic