Class SolrFacetHelper

java.lang.Object
org.alfresco.repo.search.impl.solr.facet.SolrFacetHelper

public class SolrFacetHelper extends Object
A helper class for facet queries.
Since:
5.0
Author:
Jamal Kaabi-Mofrad
  • Constructor Details

  • Method Details

    • setSpecialFacetIds

      public void setSpecialFacetIds(Set<String> ids)
    • getDefaultFacetQueries

      public List<String> 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

      public boolean hasFacetQueries(String facetField)
      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

      public List<String> getFacetQueries(String facetField)
      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

      public Set<String> 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

      public String createFacetQueriesFromSearchQuery(String field, String searchQuery)
      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

      public boolean isSpecialFacetId(String facetId)
      Is the specified facet ID part of the list of "specials" which are handled by our SOLR service as is?