[DOCS] should use setPostFilter instead of setFilter
This commit is contained in:
parent
80c7619591
commit
1075b9ae33
|
@ -23,7 +23,7 @@ SearchResponse response = client.prepareSearch("index1", "index2")
|
|||
.setTypes("type1", "type2")
|
||||
.setSearchType(SearchType.DFS_QUERY_THEN_FETCH)
|
||||
.setQuery(QueryBuilders.termQuery("multi", "test")) // Query
|
||||
.setFilter(FilterBuilders.rangeFilter("age").from(12).to(18)) // Filter
|
||||
.setPostFilter(FilterBuilders.rangeFilter("age").from(12).to(18)) // Filter
|
||||
.setFrom(0).setSize(60).setExplain(true)
|
||||
.execute()
|
||||
.actionGet();
|
||||
|
|
Loading…
Reference in New Issue