提交 dbf1a17a 编写于 作者: FelixHPP's avatar FelixHPP

build: 构建1.3.1版本, 添加查询条件支持routing 参数设置

上级 696e3cb7
......@@ -5,7 +5,7 @@
<parent>
<artifactId>easy-es</artifactId>
<groupId>indi.felix.easy</groupId>
<version>1.3.0</version>
<version>1.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>easy-es-core</artifactId>
......
......@@ -155,8 +155,17 @@ public class EasyEsService extends AbstractService {
}
public SearchResponse searchResponse(SearchSourceBuilder builder, String... index) throws IOException {
return searchResponse(builder, null, index);
}
public SearchResponse searchResponse(SearchSourceBuilder builder, List<String> routing, String... index) throws IOException {
SearchRequest request = new SearchRequest(index);
request.source(builder);
if(CollectionUtils.isNotEmpty(routing)){
request.routing(routing.toArray(new String[0]));
}
SearchResponse response = restHighLevelClient.search(request, RequestOptions.DEFAULT);
return response;
......
......@@ -7,7 +7,7 @@
<groupId>indi.felix.easy</groupId>
<artifactId>easy-es</artifactId>
<packaging>pom</packaging>
<version>1.3.0</version>
<version>1.3.1</version>
<modules>
<module>easy-es-core</module>
<!-- <module>easy-es-spring</module>-->
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册