public class BucketBasedJsonFacet extends Object
{ "numBuckets": 2, "buckets": [ {...}, {...} ] }
Allows access to all top-level "terms" and "range" response properties (e.g. allBuckets
, numBuckets
,
before
, etc.)
Modifier and Type | Field and Description |
---|---|
static int |
UNSET_FLAG |
Constructor and Description |
---|
BucketBasedJsonFacet(NamedList<Object> bucketBasedFacet) |
Modifier and Type | Method and Description |
---|---|
int |
getAfter()
Deprecated.
this method can trigger ClassCastException's if the returned value is a long. In the future it will
return a 'long' instead to avoid this problem. Until then, use
getAfterCount() instead. |
long |
getAfterCount()
The count of all records whose field value follows the
end of this "range" facet
This value is only present if the user has specifically requested it with the other option. |
long |
getAllBuckets()
The sum cardinality of all buckets in the "terms" facet.
|
int |
getBefore()
Deprecated.
this method can trigger ClassCastException's if the returned value is a long. In the future it will
return a 'long' instead to avoid this problem. Until then, use
getBeforeCount() instead. |
long |
getBeforeCount()
The count of all records whose field value precedes the
start of this "range" facet
This value is only present if the user has specifically requested it with the other option. |
int |
getBetween()
Deprecated.
this method can trigger ClassCastException's if the returned value is a long. In the future it will
return a 'long' instead to avoid this problem. Until then, use
getBetweenCount() instead. |
long |
getBetweenCount()
The count of all records whose field value falls between
start and end . |
List<BucketJsonFacet> |
getBuckets()
Retrieves the facet buckets returned by the server.
|
int |
getNumBuckets()
Deprecated.
this method can trigger ClassCastException's if the returned value is a long. In the future it will
return a 'long' instead to avoid this problem. Until then, use
getNumBucketsCount() instead. |
long |
getNumBucketsCount()
The total number of buckets found in the domain (of which the returned buckets are only a part).
|
public static final int UNSET_FLAG
public List<BucketJsonFacet> getBuckets()
public int getNumBuckets()
getNumBucketsCount()
instead.numBuckets
option. UNSET_FLAG
is returned if this is a "range" facet or numBuckets
computation was not requested in the intiial request.public long getNumBucketsCount()
numBuckets
option. UNSET_FLAG
is returned if this is a "range" facet or numBuckets
computation was not requested in the intiial request.public long getAllBuckets()
getAllBuckets()
return a result greater than the number of documents in the domain.
This value is only present if the user has specifically requested it with the allBuckets
option.
UNSET_FLAG
is returned if this is not the case.
public int getBefore()
getBeforeCount()
instead.start
of this "range" facet
This value is only present if the user has specifically requested it with the other
option.
UNSET_FLAG
is returned if this is not the case.public long getBeforeCount()
start
of this "range" facet
This value is only present if the user has specifically requested it with the other
option.
UNSET_FLAG
is returned if this is not the case.public int getAfter()
getAfterCount()
instead.end
of this "range" facet
This value is only present if the user has specifically requested it with the other
option.
UNSET_FLAG
is returned if this is not the case.public long getAfterCount()
end
of this "range" facet
This value is only present if the user has specifically requested it with the other
option.
UNSET_FLAG
is returned if this is not the case.public int getBetween()
getBetweenCount()
instead.start
and end
.
This value is only present if the user has specifically requested it with the other
option.
UNSET_FLAG
is returned if this is not the case.public long getBetweenCount()
start
and end
.
This value is only present if the user has specifically requested it with the other
option.
UNSET_FLAG
is returned if this is not the case.Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.