Class DefaultIndexerSearchService

  • All Implemented Interfaces:
    IndexerSearchService<com.broadleafcommerce.search.api.domain.FieldDefinition>

    public class DefaultIndexerSearchService
    extends Object
    implements IndexerSearchService<com.broadleafcommerce.search.api.domain.FieldDefinition>
    • Constructor Detail

      • DefaultIndexerSearchService

        public DefaultIndexerSearchService​(org.springframework.web.reactive.function.client.WebClient webClient,
                                           String searchServiceEndpoint,
                                           String readFieldsPath)
    • Method Detail

      • readFieldsByIndexableType

        @Cacheable(cacheNames="indexCacheByIndexableType",
                   sync=true)
        public List<com.broadleafcommerce.search.api.domain.FieldDefinition> readFieldsByIndexableType​(com.broadleafcommerce.search.api.type.IndexableType indexableType)
        Description copied from interface: IndexerSearchService
        Returns a list of Search fields by IndexableType
        Specified by:
        readFieldsByIndexableType in interface IndexerSearchService<com.broadleafcommerce.search.api.domain.FieldDefinition>
        Parameters:
        indexableType - The indexable type
        Returns:
        Search fields associated with the IndexableType
      • clearCache

        @CacheEvict("indexCacheByIndexableType")
        public void clearCache​(com.broadleafcommerce.search.api.type.IndexableType indexableType)
        Description copied from interface: IndexerSearchService
        Clear any cached fields for the indexable type.
        Specified by:
        clearCache in interface IndexerSearchService<com.broadleafcommerce.search.api.domain.FieldDefinition>
        Parameters:
        indexableType - The indexable type to clear
      • readFieldsByIndexableType

        protected List<com.broadleafcommerce.search.api.domain.FieldDefinition> readFieldsByIndexableType​(String indexableType)
      • buildSearchFieldUri

        protected URI buildSearchFieldUri​(String indexableType)
      • getWebClient

        protected org.springframework.web.reactive.function.client.WebClient getWebClient()
      • getSearchServiceEndpoint

        protected String getSearchServiceEndpoint()
      • getReadFieldsPath

        protected String getReadFieldsPath()
      • getServiceClient

        public String getServiceClient()
        The service client to use when calling inventory services. Default is "indexerclient"
      • setServiceClient

        public void setServiceClient​(String serviceClient)
        The service client to use when calling inventory services. Default is "indexerclient"