Java Elasticsearch字符串模糊查询

代码

BoolQueryBuilder queryBuilder = new BoolQueryBuilder();
if (StringUtil.isNotEmpty(interfaceDTO.getRequestParamsContain())) {
    queryBuilder.must(QueryBuilders.wildcardQuery("downStreamRequestParams.keyword", "*" + interfaceDTO.getRequestParamsContain() + "*"));
}

你可能感兴趣的:(java,elasticsearch)