瓦力老师,如何用xcontentbuilder创建结构化索引呢?官方有没有提供一些枚举?我不想每次都是手写好json 然后用http工具put上去,感觉这样不方便,感觉用代码创建结构化索引比较好。
条件没有设置 rangeQuery :
SearchRequestBuilder builder = client.prepareSearch("book")
.setTypes("novel")
.setSearchType(SearchType.DFS_QUERY_THEN_FETCH)
.setQuery(boolQuery)
.setQuery(rangeQuery)
.setFrom(0)
.setSize(10);
SearchRequestBuilder builder = client.prepareSearch("book")
.setTypes("novel")
.setSearchType(SearchType.DFS_QUERY_THEN_FETCH)
.setQuery(boolQuery)
.setQuery(rangeQuery)
.setFrom(0)
.setSize(10);
2018-08-22