[DOCS] should use setPostFilter instead of setFilter

This commit is contained in:
Kevin 2014-02-13 14:28:00 +11:00
parent 80c7619591
commit 1075b9ae33
1 changed files with 1 additions and 1 deletions

View File

@ -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();