Elasticsearch 安装IK分词器插件

IK分词安装

#切换到elasticsearch安装目录bin目录下
./elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v6.5.2/elasticsearch-analysis-ik-6.5.2.zip

搜索 

{
  "bool" : {
    "must" : [
      {
        "match" : {
          "isDelete" : {
            "query" : 0,
            "operator" : "OR",
            "prefix_length" : 0,
            "max_expansions" : 50,
            "fuzzy_transpositions" : true,
            "lenient" : false,
            "zero_terms_query" : "NONE",
            "boost" : 1.0
          }
        }
      },
      {
        "match" : {
          "labId" : {
            "query" : 5,
            "operator" : "OR",
            "prefix_length" : 0,
            "max_expansions" : 50,
            "fuzzy_transpositions" : true,
            "lenient" : false,
            "zero_terms_query" : "NONE",
            "boost" : 1.0
          }
        }
      },
      {
        "bool" : {
          "should" : [
            {
              "match_phrase" : {
                "kitName" : {
                  "query" : "布理岚",
                  "analyzer" : "ik_smart",
                  "slop" : 0,
                  "boost" : 1.0
                }
              }
            },
            {
              "fuzzy" : {
                "itemNo" : {
                  "value" : "布理岚",
                  "fuzziness" : "AUTO",
                  "prefix_length" : 0,
                  "max_expansions" : 50,
                  "transpositions" : false,
                  "boost" : 1.0
                }
              }
            },
            {
              "match_phrase" : {
                "alias" : {
                  "query" : "布理岚",
                  "slop" : 0,
                  "boost" : 1.0
                }
              }
            }
          ],
          "disable_coord" : false,
          "adjust_pure_negative" : true,
          "boost" : 1.0
        }
      }
    ],
    "disable_coord" : false,
    "adjust_pure_negative" : true,
    "boost" : 1.0
  }
}

猜你喜欢

转载自blog.csdn.net/weweeeeeeee/article/details/84988946