Class DefaultIndexerSearchService
- java.lang.Object
-
- com.broadleafcommerce.search.index.core.service.DefaultIndexerSearchService
-
- All Implemented Interfaces:
IndexerSearchService<com.broadleafcommerce.search.api.domain.FieldDefinition>
public class DefaultIndexerSearchService extends Object implements IndexerSearchService<com.broadleafcommerce.search.api.domain.FieldDefinition>
-
-
Field Summary
Fields Modifier and Type Field Description static String
CACHE_BY_INDEXABLE_TYPE
protected static String
CLIENT_REGISTRATION_ID
Deprecated.
-
Constructor Summary
Constructors Constructor Description DefaultIndexerSearchService(org.springframework.web.reactive.function.client.WebClient webClient, String searchServiceEndpoint, String readFieldsPath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected URI
buildSearchFieldUri(String indexableType)
void
clearCache(com.broadleafcommerce.search.api.type.IndexableType indexableType)
Clear any cached fields for the indexable type.protected String
getReadFieldsPath()
protected String
getSearchServiceEndpoint()
String
getServiceClient()
The service client to use when calling inventory services.protected org.springframework.web.reactive.function.client.WebClient
getWebClient()
List<com.broadleafcommerce.search.api.domain.FieldDefinition>
readFieldsByIndexableType(com.broadleafcommerce.search.api.type.IndexableType indexableType)
Returns a list of Search fields by IndexableTypeprotected List<com.broadleafcommerce.search.api.domain.FieldDefinition>
readFieldsByIndexableType(String indexableType)
void
setServiceClient(String serviceClient)
The service client to use when calling inventory services.
-
-
-
Field Detail
-
CACHE_BY_INDEXABLE_TYPE
public static final String CACHE_BY_INDEXABLE_TYPE
- See Also:
- Constant Field Values
-
CLIENT_REGISTRATION_ID
@Deprecated protected static final String CLIENT_REGISTRATION_ID
Deprecated.- See Also:
- Constant Field Values
-
-
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 interfaceIndexerSearchService<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 interfaceIndexerSearchService<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)
-
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"
-
-