Class DefaultSuggestConfigProvider
java.lang.Object
de.cxp.ocs.smartsuggest.spi.standard.DefaultSuggestConfigProvider
- All Implemented Interfaces:
SuggestConfigProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetConfig
(@NonNull String indexName, SuggestConfig indexConfig) Retrieve config for a given index.int
Return priority when this config provider should be asked for the configuration.
-
Constructor Details
-
DefaultSuggestConfigProvider
public DefaultSuggestConfigProvider() -
DefaultSuggestConfigProvider
-
-
Method Details
-
getConfig
Description copied from interface:SuggestConfigProvider
Retrieve config for a given index. In case only some index specific values should be set, the default suggest config can be used since it may contain global settings (if not null).- Specified by:
getConfig
in interfaceSuggestConfigProvider
- Parameters:
indexName
-indexConfig
- copy of the suggest config that was set as default for the whole service. It can be modified and returned or a different config object can be returned. Returning null is considered equivalent to returning that default config.- Returns:
-
getPriority
public int getPriority()Description copied from interface:SuggestConfigProvider
Return priority when this config provider should be asked for the configuration. Providers with a low priority value (e.g. 1) will be asked first and providers with a higher value will be called later and can overwrite previously set values.- Specified by:
getPriority
in interfaceSuggestConfigProvider
- Returns:
- priority value, defaults to 100
-