其他分享
首页 > 其他分享> > 【ElasticSearch】示例

【ElasticSearch】示例

作者:互联网

【ElasticSearch】示例

============================================================

1、类似 MySQL like 功能

============================================================

 

{
  "query": {
    "bool": {
      "must": [
        {
          "wildcard": {
            "title": {
              "wildcard": "*区县*",
              "boost": 1
            }
          }
        }
      ]
    }
  }
}

boolQueryBuilder.must(QueryBuilders.wildcardQuery("title", "*" + maps.get("title").toString() + "*"));

 

标签:boolQueryBuilder,title,示例,ElasticSearch,wildcard,must
来源: https://www.cnblogs.com/yangchongxing/p/13065054.html