zoukankan      html  css  js  c++  java
  • 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# 

  • 相关阅读:
    循环语句
    流程控制
    特殊的赋值运算符
    位运算符
    运算符
    八种基本类型
    cmd基础命令
    springboot项目部署到tomcat步骤以及常见问题
    【算法问题】如何实现大整数相加
    【算法问题】删除k个数字后的最小值
  • 原文地址:https://www.cnblogs.com/zhaoyangjian724/p/6199256.html
Copyright © 2011-2022 走看看