Class FacetResultValue (2.0.0)

public final class FacetResultValue implements Serializable

Represents a single facet result value. The value has a label, a count, and a refinementToken.

Inheritance

java.lang.Object > FacetResultValue

Implements

Serializable

Static Methods

create(String label, int count, String refinementToken)

public static FacetResultValue create(String label, int count, String refinementToken)

Creates and returns a facet result value.

Parameters
Name Description
label String

The label of the result returned by the backend that is the name of facet for atom facets and the string "[start,end)" for number facets.

count int

an integer representing how many times this value is repeated in the result.

refinementToken String

the token string for further refinement of the search result. To combine values for a single facet, add each of them separately to FacetRequest. There will be a disjunction between refinements for the same facet.

Returns
Type Description
FacetResultValue

an instance of FacetResultValue.

Methods

getCount()

public int getCount()

Returns the count of the result value, which is an integer representing how many times this value is repeated in the result for the given facet value or range.

Returns
Type Description
int

the count of this label in facet result.

getLabel()

public String getLabel()

Returns the label of this facet result value. The value label returned by the backend can be a single facet value name, or a range label in "[start,end)" format.

Returns
Type Description
String

label as string

getRefinementToken()

public String getRefinementToken()

Returns the refinement token for this result value. This token can be used to filter the result of new searches using this facet value.

Returns
Type Description
String

the refinement token string.

toString()

public String toString()
Returns
Type Description
String
Overrides