Class AbstractFacetResult
java.lang.Object
com.couchbase.client.java.search.result.facets.AbstractFacetResult
- All Implemented Interfaces:
FacetResult
- Direct Known Subclasses:
DefaultDateRangeFacetResult
,DefaultNumericRangeFacetResult
,DefaultTermFacetResult
@Experimental @Private public abstract class AbstractFacetResult extends Object implements FacetResult
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractFacetResult(String name, String field, long total, long missing, long other)
-
Method Summary
-
Field Details
-
name
-
field
-
total
protected final long total -
missing
protected final long missing -
other
protected final long other
-
-
Constructor Details
-
AbstractFacetResult
-
-
Method Details
-
name
- Specified by:
name
in interfaceFacetResult
- Returns:
- the name of the
SearchFacet
this result corresponds to.
-
field
- Specified by:
field
in interfaceFacetResult
- Returns:
- the field the
SearchFacet
was targeting.
-
missing
public long missing()- Specified by:
missing
in interfaceFacetResult
- Returns:
- the number of results that couldn't be faceted, missing the adequate value. Not matter how many more buckets are added to the original facet, these result won't ever be included in one.
-
other
public long other()- Specified by:
other
in interfaceFacetResult
- Returns:
- the number of results that could have been faceted (because they have a value for the facet's field) but weren't, due to not having a bucket in which they belong. Adding a bucket can result in these results being faceted.
-
total
public long total()- Specified by:
total
in interfaceFacetResult
- Returns:
- the total number of *valued* facet results. Total =
FacetResult.other()
+ terms (but doesn't includeFacetResult.missing()
).
-