Changed documentation to use getter notation
Updated some java documentation to reflect the use of getters instead of calling methods based on field names. Relates to #2657
This commit is contained in:
parent
f73241ea79
commit
f0cf97c0ac
|
@ -67,7 +67,7 @@ while (true) {
|
|||
//Handle the hit...
|
||||
}
|
||||
//Break condition: No hits are returned
|
||||
if (scrollResp.hits().hits().length == 0) {
|
||||
if (scrollResp.getHits().getHits().length == 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -111,9 +111,9 @@ MultiSearchResponse sr = node.client().prepareMultiSearch()
|
|||
|
||||
// You will get all individual responses from MultiSearchResponse#responses()
|
||||
long nbHits = 0;
|
||||
for (MultiSearchResponse.Item item : sr.responses()) {
|
||||
SearchResponse response = item.response();
|
||||
nbHits += response.hits().totalHits();
|
||||
for (MultiSearchResponse.Item item : sr.getResponses()) {
|
||||
SearchResponse response = item.getResponse();
|
||||
nbHits += response.getHits().getTotalHits();
|
||||
}
|
||||
--------------------------------------------------
|
||||
|
||||
|
@ -132,8 +132,8 @@ SearchResponse sr = node.client().prepareSearch()
|
|||
.execute().actionGet();
|
||||
|
||||
// Get your facet results
|
||||
TermsFacet f1 = (TermsFacet) sr.facets().facetsAsMap().get("f1");
|
||||
DateHistogramFacet f2 = (DateHistogramFacet) sr.facets().facetsAsMap().get("f2");
|
||||
TermsFacet f1 = (TermsFacet) sr.getFacets().facetsAsMap().get("f1");
|
||||
DateHistogramFacet f2 = (DateHistogramFacet) sr.getFacets().facetsAsMap().get("f2");
|
||||
--------------------------------------------------
|
||||
|
||||
See <<java-facets,Facets Java API>>
|
||||
|
|
Loading…
Reference in New Issue