elasticsearch6 query 全文查询与词项查询

elasticsearch6 query 全文查询与词项查询

query

全文查询

  1. QueryBuilders.matchQuery(“filed”,”value”).operator(Operator.AND); // 对查询的语句进行分词,分词后的词任意一个匹配doc都能查出来 term query 查询的是词项<分词后的> (eg:Java编程思想) Java编程 term query 不能查到 分词后变成(Java 编程 思想) matchQuery能查到
  2. QueryBuilders.matchPhraseQuery(“field”,”value”);
    对value进行分词,可以自定义分词器,满足两个条件才能被搜到:
    • 分词后的所有词项都要匹配原字段
    • 顺序还需要一致
leetcode-1-Two Sum

leetcode-1-Two Sum

description

Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,
Because nums[0] + nums[1] = 2 + 7 = 9,
return [0, 1].

  
Hello blog
Hello World
2019成长记01