Package org.codelibs.fess.util
Class FacetResponse
java.lang.Object
org.codelibs.fess.util.FacetResponse
Response object for faceted search results containing query counts and field facets.
This class processes OpenSearch aggregations to provide structured facet information
for search result filtering and navigation.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents a field facet with its name and value counts. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<FacetResponse.Field> List of field facets containing aggregated field values and their counts.Map containing query facet counts, where keys are decoded query strings and values are document counts for each query. -
Constructor Summary
ConstructorsConstructorDescriptionFacetResponse(org.opensearch.search.aggregations.Aggregations aggregations) Constructs a FacetResponse from OpenSearch aggregations. -
Method Summary
Modifier and TypeMethodDescriptionGets the list of field facets.Gets the map of query facet counts.booleanChecks if this response contains any facet information.toString()
-
Field Details
-
queryCountMap
Map containing query facet counts, where keys are decoded query strings and values are document counts for each query. -
fieldList
List of field facets containing aggregated field values and their counts.
-
-
Constructor Details
-
FacetResponse
public FacetResponse(org.opensearch.search.aggregations.Aggregations aggregations) Constructs a FacetResponse from OpenSearch aggregations. Processes both field facets and query facets from the aggregation results.- Parameters:
aggregations- the OpenSearch aggregations containing facet data, may be null
-
-
Method Details
-
hasFacetResponse
public boolean hasFacetResponse()Checks if this response contains any facet information.- Returns:
- true if either query count map or field list is not null
-
getQueryCountMap
Gets the map of query facet counts.- Returns:
- the queryCountMap containing decoded query strings and their counts
-
getFieldList
Gets the list of field facets.- Returns:
- the fieldList containing all field facet information
-
toString
-