Class FacetPopulator

    • Constructor Detail

      • FacetPopulator

        public FacetPopulator()
    • Method Detail

      • resolveFacetValueDisplayName

        protected java.lang.String resolveFacetValueDisplayName​(SearchQuery searchQuery,
                                                                IndexedProperty indexedProperty,
                                                                java.lang.Object facetDisplayNameProvider,
                                                                java.lang.String facetValue)
        Helper method to retrieve the display name for a given facet value.
        Parameters:
        searchQuery - the SearchQuery being used for the current Solr indexing process.
        indexedProperty - the IndexedProperty we wish to look up.
        facetDisplayNameProvider - the display name provider, an instance of the class used to retrieve the display name of the facet.
        facetValue - the value of the facet being used.
        Returns:
        the display name for the facet value, or the value itself if we can not derive it.
      • resolveFacetValueDisplayNameUsingLegacyProvider

        protected java.lang.String resolveFacetValueDisplayNameUsingLegacyProvider​(SearchQuery searchQuery,
                                                                                   java.lang.Object facetDisplayNameProvider,
                                                                                   java.lang.String facetValue)
        resolveFacetValueDisplayNameUsingLegacyProvider is a method for retrieving the display name provider for a facet where the provider is an instance of the deprecated FacetDisplayNameProvider.
        Parameters:
        searchQuery - the SearchQuery being used for the current Solr indexing process.
        facetDisplayNameProvider - the display name provider, an instance of the class used to retrieve the display name of the facet.
        facetValue - the value of the facet being used.
        Returns:
        the display name for the facet value.
      • getFacetDisplayNameProvider

        protected static java.lang.Object getFacetDisplayNameProvider​(FacetField facet)
        Utility method for retrieving a bean from the configured bean factory.
        Parameters:
        facet -
        Returns:
      • createFacetValueMapping

        protected FacetValue createFacetValueMapping​(java.lang.String fieldValue,
                                                     SearchQuery query,
                                                     IndexedProperty indexedProperty,
                                                     java.lang.Object displayNameProvider)
        Helper method to create a FacetValue for a given facet.
        Parameters:
        fieldValue - a String representing the raw facet value.
        query - the SearchQuery being used for the current Solr indexing process.
        indexedProperty - the IndexedProperty we wish to look up.
        displayNameProvider - the configured facet display name provider being used.
        Returns:
        an instance of FacetValue representing this facet.
      • createFacetValueMapping

        protected FacetValue createFacetValueMapping​(java.lang.Object fieldValue,
                                                     SearchQuery query,
                                                     IndexedProperty indexedProperty,
                                                     java.lang.Object displayNameProvider)
        Helper method to create a FacetValue for a given facet.
        Parameters:
        fieldValue - an Object representing the raw facet value.
        query - the SearchQuery being used for the current Solr indexing process.
        indexedProperty - the IndexedProperty we wish to look up.
        displayNameProvider - the configured facet display name provider being used.
        Returns:
        an instance of FacetValue representing this facet.