Class SolrFacetHelper
java.lang.Object
org.alfresco.repo.search.impl.solr.facet.SolrFacetHelper
A helper class for facet queries.
- Since:
- 5.0
- Author:
- Jamal Kaabi-Mofrad
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateFacetQueriesFromSearchQuery(String field, String searchQuery) Creates a facet query by trying to extract the date range from the the search query.Gets predefined set of field facets which are used to construct bucketingGets the predefined set of facet queries.getFacetQueries(String facetField) Gets all the defined facet queries for the specified fieldbooleanhasFacetQueries(String facetField) Whether the specified field is defined as a facet.query or notbooleanisSpecialFacetId(String facetId) Is the specified facet ID part of the list of "specials" which are handled by our SOLR service as is?voidsetSpecialFacetIds(Set<String> ids)
-
Constructor Details
-
SolrFacetHelper
Constructor
-
-
Method Details
-
setSpecialFacetIds
-
getDefaultFacetQueries
Gets the predefined set of facet queries. Currently the facet queries are:- Created date buckets
- Modified date buckets
- Content size buckets
- Returns:
- list of facet queries
-
hasFacetQueries
Whether the specified field is defined as a facet.query or not- Parameters:
facetField- String- Returns:
- true if the facet is facet.query, false otherwise
-
getFacetQueries
Gets all the defined facet queries for the specified field- Parameters:
facetField- the requested field- Returns:
- an unmodifiable list of facet queries, or null if none found
-
getBucketedFieldFacets
Gets predefined set of field facets which are used to construct bucketing- Returns:
- an unmodifiable view of the set of predefined field facets
-
createFacetQueriesFromSearchQuery
Creates a facet query by trying to extract the date range from the the search query.- Returns:
- the facet query, or null if the date range cannot be extracted
-
isSpecialFacetId
Is the specified facet ID part of the list of "specials" which are handled by our SOLR service as is?
-