Interface StopwordService
public interface StopwordService
Service for managing stopwords in the search engine.
-
Method Summary
Modifier and TypeMethodDescriptionaddStopword
(Stopword stopword, com.broadleafcommerce.search.api.type.IndexableType indexableType, Locale locale, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Add a single stopwordaddStopwords
(List<Stopword> stopword, com.broadleafcommerce.search.api.type.IndexableType indexableType, Locale locale, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Add a list of stopwordsvoid
deleteStopword
(Stopword stopword, com.broadleafcommerce.search.api.type.IndexableType indexableType, Locale locale, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Delete a stopwordvoid
loadStopwords
(LoadStopwordProperties loadStopwordProperties) Load stopwords from the supplied configuration properties.readStopword
(Stopword stopword, com.broadleafcommerce.search.api.type.IndexableType indexableType, Locale locale, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read a single stopwordreadStopwords
(com.broadleafcommerce.search.api.type.IndexableType indexableType, Locale locale, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read all stopwords for an indexable type and locale
-
Method Details
-
readStopwords
List<Stopword> readStopwords(com.broadleafcommerce.search.api.type.IndexableType indexableType, Locale locale, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read all stopwords for an indexable type and locale- Parameters:
indexableType
- The target indexable typelocale
- The target localecontextInfo
- Context containing information about current tenant and application- Returns:
- A list of stopwords
-
addStopword
Stopword addStopword(Stopword stopword, com.broadleafcommerce.search.api.type.IndexableType indexableType, Locale locale, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Add a single stopword- Parameters:
stopword
- The stopword to addindexableType
- The target indexable typelocale
- The target localecontextInfo
- Context containing information about current tenant and application- Returns:
- The added stopword
-
addStopwords
List<Stopword> addStopwords(List<Stopword> stopword, com.broadleafcommerce.search.api.type.IndexableType indexableType, Locale locale, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Add a list of stopwords- Parameters:
stopword
- the stopwords to addindexableType
- The target indexable typelocale
- The target localecontextInfo
- Context containing information about current tenant and application- Returns:
- The list of stopwords added
-
deleteStopword
void deleteStopword(Stopword stopword, com.broadleafcommerce.search.api.type.IndexableType indexableType, Locale locale, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Delete a stopword- Parameters:
stopword
- The stopword to deleteindexableType
- The target indexable typelocale
- The target localecontextInfo
- Context containing information about current tenant and application
-
readStopword
Optional<Stopword> readStopword(Stopword stopword, com.broadleafcommerce.search.api.type.IndexableType indexableType, Locale locale, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Read a single stopword- Parameters:
stopword
- The stopword to readindexableType
- The target indexable typelocale
- The target localecontextInfo
- Context containing information about current tenant and application- Returns:
- The stopword, if it exists
-
loadStopwords
Load stopwords from the supplied configuration properties. Stopwords will not be loaded if the supplied collection for a language already has stopwords.- Parameters:
loadStopwordProperties
- The configuration properties
-