Class SearchConfiguration
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddPluginConfiguration
(@NonNull String pluginClassName, @NonNull Map<String, String> pluginConfig) Settings for the single possible customization classes, like rescorers, query analyzers etc.setFacetConfiguration
(@NonNull FacetConfiguration facetConfiguration) Optional facet configuration to customize the way the facets should be displayed.setHeroProductResolver
(Map<SearchConfiguration.ProductSetType, String> customResolverClasses) setIndexName
(String indexName) Optional index-name that should be addressed by the tenant.Set locale to handle certain language specific normalization inside the searcher, like case-insensitive filters.setQueryConfigs
(@NonNull List<QueryConfiguration> queryConfigs) Get query relaxation chain.setQueryProcessing
(@NonNull QueryProcessingConfiguration queryProcessing) Optional query processing configuration.setRescorers
(@NonNull List<String> rescorers) List of full canonical class names of theRescorerProvider
that should activated for the according tenant.setScoring
(@NonNull ScoringConfiguration scoring) Optional scoring configuration.setSortConfigs
(@NonNull List<SortOptionConfiguration> sortConfigs) Specific which sorting option should be part of result.void
setVariantPickingStrategy
(String variantPickingStrategy) Set when variants should be the result hit instead of their main product.
-
Constructor Details
-
SearchConfiguration
public SearchConfiguration()
-
-
Method Details
-
setHeroProductResolver
public SearchConfiguration setHeroProductResolver(Map<SearchConfiguration.ProductSetType, String> customResolverClasses) -
setIndexName
Optional index-name that should be addressed by the tenant. If null, the index name will be set to the tenant name.- Parameters:
indexName
- index name- Returns:
- self
-
setLocale
Set locale to handle certain language specific normalization inside the searcher, like case-insensitive filters. Defaults to ROOT locale.- Parameters:
locale
- locale to set- Returns:
- self
-
setQueryProcessing
public SearchConfiguration setQueryProcessing(@NonNull @NonNull QueryProcessingConfiguration queryProcessing) Optional query processing configuration. If nothing special is defined, the standard behavior will be used.- Parameters:
queryProcessing
- query processing configuration- Returns:
- self
-
setFacetConfiguration
public SearchConfiguration setFacetConfiguration(@NonNull @NonNull FacetConfiguration facetConfiguration) Optional facet configuration to customize the way the facets should be displayed.
If default/empty, facets will be generated according to default settings.
- Parameters:
facetConfiguration
- facet configuration- Returns:
- self
-
setScoring
Optional scoring configuration.
If set to default (empty), no scoring rules will be applied at all.
- Parameters:
scoring
- scoring configuration- Returns:
- self
-
setRescorers
List of full canonical class names of the
RescorerProvider
that should activated for the according tenant.Use the 'pluginConfiguration' setting to add custom configuration for the activated rescorers.
Per defaults it's empty, so no rescorers are used.
- Parameters:
rescorers
- list of canonical rescorer-provider class names- Returns:
- self
-
setQueryConfigs
Get query relaxation chain. If empty, only the DefaultQueryBuilder will be used.- Parameters:
queryConfigs
- list of query configuration- Returns:
- self
-
setSortConfigs
public SearchConfiguration setSortConfigs(@NonNull @NonNull List<SortOptionConfiguration> sortConfigs) Specific which sorting option should be part of result.
If list is empty, all possible sorting options will be delivered in default style according to indexed sorting fields.
- Parameters:
sortConfigs
- list of sort configuration- Returns:
- self
-
addPluginConfiguration
public SearchConfiguration addPluginConfiguration(@NonNull @NonNull String pluginClassName, @NonNull @NonNull Map<String, String> pluginConfig) Settings for the single possible customization classes, like rescorers, query analyzers etc.
As a key the full canonical class name of the customization class is expected.
The value is an optional string-to-string map with arbitrary settings for the according customization class that will be passed to it with the "initialize" method.
Check the java-doc of the according classes for more details.
- Parameters:
pluginClassName
- full class namespluginConfig
- config data for that plugin class- Returns:
- self
-
setVariantPickingStrategy
Set when variants should be the result hit instead of their main product. Could be one of the following predefined strategies:- "pickAlways": pick first variant if available.
- "pickIfDrilledDown": Pick best variant if at a single hit some variants were filtered.
- "pickIfBestScored": Pick first variant, if it has a better score than the second one or if it's the only one left.
- "pickIfSingleHit": Picks a variant only if there are no other variants matching.
- Parameters:
variantPickingStrategy
- name of variant picking strategy
-