在elasticsearch5.1.1中, 找不到commonTermsQuery 定义
Elasticsearch | 作者 hellosearch | 发布于2017年04月13日 | 阅读数:4555
代码如下:
//set cluster name
Settings settings = Settings.builder().put("cluster.name", "es5-cluster").build();
TransportClient client = new PreBuiltTransportClient(settings)
.addTransportAddress(
new InetSocketTransportAddress(InetAddress.getByName("127.0.0.1"), 9300));// 127.0.0.1
//下面这行找不到定义
please help, thanks~~~
QueryBuilder qb = commonTermsQuery("name","kimchy");
在pom.xml已经添加了依赖:
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>5.1.1</version>
</dependency>
<!-- https://mvnrepository.com/arti ... sport -->
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>transport</artifactId>
<version>5.1.1</version>
</dependency>
//set cluster name
Settings settings = Settings.builder().put("cluster.name", "es5-cluster").build();
TransportClient client = new PreBuiltTransportClient(settings)
.addTransportAddress(
new InetSocketTransportAddress(InetAddress.getByName("127.0.0.1"), 9300));// 127.0.0.1
//下面这行找不到定义
please help, thanks~~~
QueryBuilder qb = commonTermsQuery("name","kimchy");
在pom.xml已经添加了依赖:
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>5.1.1</version>
</dependency>
<!-- https://mvnrepository.com/arti ... sport -->
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>transport</artifactId>
<version>5.1.1</version>
</dependency>
0 个回复