Java API Documentation (0.90+) needs update for accessors in Facets docs

Closes #3921.
(cherry picked from commit a753c48)
This commit is contained in:
David Pilato 2013-10-17 09:47:58 +02:00
parent 2593b6e644
commit 4efd94e7cf
2 changed files with 10 additions and 10 deletions

View File

@ -62,7 +62,7 @@ import org.elasticsearch.search.facet.terms.*;
[source,java] [source,java]
-------------------------------------------------- --------------------------------------------------
// sr is here your SearchResponse object // sr is here your SearchResponse object
TermsFacet f = (TermsFacet) sr.facets().facetsAsMap().get("f"); TermsFacet f = (TermsFacet) sr.getFacets().facetsAsMap().get("f");
f.getTotalCount(); // Total terms doc count f.getTotalCount(); // Total terms doc count
f.getOtherCount(); // Not shown terms doc count f.getOtherCount(); // Not shown terms doc count
@ -110,7 +110,7 @@ import org.elasticsearch.search.facet.range.*;
[source,java] [source,java]
-------------------------------------------------- --------------------------------------------------
// sr is here your SearchResponse object // sr is here your SearchResponse object
RangeFacet f = (RangeFacet) sr.facets().facetsAsMap().get("f"); RangeFacet f = (RangeFacet) sr.getFacets().facetsAsMap().get("f");
// For each entry // For each entry
for (RangeFacet.Entry entry : f) { for (RangeFacet.Entry entry : f) {
@ -157,7 +157,7 @@ import org.elasticsearch.search.facet.histogram.*;
[source,java] [source,java]
-------------------------------------------------- --------------------------------------------------
// sr is here your SearchResponse object // sr is here your SearchResponse object
HistogramFacet f = (HistogramFacet) sr.facets().facetsAsMap().get("f"); HistogramFacet f = (HistogramFacet) sr.getFacets().facetsAsMap().get("f");
// For each entry // For each entry
for (HistogramFacet.Entry entry : f) { for (HistogramFacet.Entry entry : f) {
@ -200,7 +200,7 @@ import org.elasticsearch.search.facet.datehistogram.*;
[source,java] [source,java]
-------------------------------------------------- --------------------------------------------------
// sr is here your SearchResponse object // sr is here your SearchResponse object
DateHistogramFacet f = (DateHistogramFacet) sr.facets().facetsAsMap().get("f"); DateHistogramFacet f = (DateHistogramFacet) sr.getFacets().facetsAsMap().get("f");
// For each entry // For each entry
for (DateHistogramFacet.Entry entry : f) { for (DateHistogramFacet.Entry entry : f) {
@ -247,7 +247,7 @@ import org.elasticsearch.search.facet.filter.*;
[source,java] [source,java]
-------------------------------------------------- --------------------------------------------------
// sr is here your SearchResponse object // sr is here your SearchResponse object
FilterFacet f = (FilterFacet) sr.facets().facetsAsMap().get("f"); FilterFacet f = (FilterFacet) sr.getFacets().facetsAsMap().get("f");
f.getCount(); // Number of docs that matched f.getCount(); // Number of docs that matched
-------------------------------------------------- --------------------------------------------------
@ -284,7 +284,7 @@ import org.elasticsearch.search.facet.query.*;
[source,java] [source,java]
-------------------------------------------------- --------------------------------------------------
// sr is here your SearchResponse object // sr is here your SearchResponse object
QueryFacet f = (QueryFacet) sr.facets().facetsAsMap().get("f"); QueryFacet f = (QueryFacet) sr.getFacets().facetsAsMap().get("f");
f.getCount(); // Number of docs that matched f.getCount(); // Number of docs that matched
-------------------------------------------------- --------------------------------------------------
@ -324,7 +324,7 @@ import org.elasticsearch.search.facet.statistical.*;
[source,java] [source,java]
-------------------------------------------------- --------------------------------------------------
// sr is here your SearchResponse object // sr is here your SearchResponse object
StatisticalFacet f = (StatisticalFacet) sr.facets().facetsAsMap().get("f"); StatisticalFacet f = (StatisticalFacet) sr.getFacets().facetsAsMap().get("f");
f.getCount(); // Doc count f.getCount(); // Doc count
f.getMin(); // Min value f.getMin(); // Min value
@ -369,7 +369,7 @@ import org.elasticsearch.search.facet.termsstats.*;
[source,java] [source,java]
-------------------------------------------------- --------------------------------------------------
// sr is here your SearchResponse object // sr is here your SearchResponse object
TermsStatsFacet f = (TermsStatsFacet) sr.facets().facetsAsMap().get("f"); TermsStatsFacet f = (TermsStatsFacet) sr.getFacets().facetsAsMap().get("f");
f.getTotalCount(); // Total terms doc count f.getTotalCount(); // Total terms doc count
f.getOtherCount(); // Not shown terms doc count f.getOtherCount(); // Not shown terms doc count
f.getMissingCount(); // Without term doc count f.getMissingCount(); // Without term doc count
@ -423,7 +423,7 @@ import org.elasticsearch.search.facet.geodistance.*;
[source,java] [source,java]
-------------------------------------------------- --------------------------------------------------
// sr is here your SearchResponse object // sr is here your SearchResponse object
GeoDistanceFacet f = (GeoDistanceFacet) sr.facets().facetsAsMap().get("f"); GeoDistanceFacet f = (GeoDistanceFacet) sr.getFacets().facetsAsMap().get("f");
// For each entry // For each entry
for (GeoDistanceFacet.Entry entry : f) { for (GeoDistanceFacet.Entry entry : f) {

View File

@ -109,7 +109,7 @@ MultiSearchResponse sr = node.client().prepareMultiSearch()
.add(srb2) .add(srb2)
.execute().actionGet(); .execute().actionGet();
// You will get all individual responses from MultiSearchResponse#responses() // You will get all individual responses from MultiSearchResponse#getResponses()
long nbHits = 0; long nbHits = 0;
for (MultiSearchResponse.Item item : sr.getResponses()) { for (MultiSearchResponse.Item item : sr.getResponses()) {
SearchResponse response = item.getResponse(); SearchResponse response = item.getResponse();