1. 程式人生 > >elasticsearch 搜尋不支援單詞的部分進行匹配

elasticsearch 搜尋不支援單詞的部分進行匹配

zjtest7-frontend:/usr/local/logstash-2.3.4/config# curl -XGET http://192.168.32.80:9200/logstash-2015.06.21/testlog/_search?q=fir
{"took":4,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}zjtest7-frontend:/usr/local/logstash-2.3.4/config# 


zjtest7-frontend:/usr/local/logstash-2.3.4/config# curl -XGET http://192.168.32.80:9200/logstash-2015.06.21/testlog/_search?q=fir??
{"took":3,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":1,"max_score":1.0,"hits":[{"_index":"logstash-2015.06.21","_type":"testlog","_id":"AVbklB1aEY-

onx06xxpY","_score":1.0,"_source":{
"date" :"19999999999",
"user":"scan188",
"mesg":"first message into Elasticsearch"
}}]}}

zjtest7-frontend:/usr/local/logstash-2.3.4/config# curl -XGET http://192.168.32.80:9200/logstash-2015.06.21/testlog/_search?q=first
{"took":3,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":1,"max_score":0.30685282,"hits":[{"_index":"logstash-2015.06.21","_type":"testlog","_id":"AVbklB1aEY-

onx06xxpY","_score":0.30685282,"_source":{
"date" :"19999999999",
"user":"scan188",
"mesg":"first message into Elasticsearch"
}}]}}zjtest7-frontend:/usr/local/logstash-2.3.4/config#