Class QuerySuggestManager.QuerySuggestManagerBuilder

    • Constructor Detail

      • QuerySuggestManagerBuilder

        public QuerySuggestManagerBuilder()
    • Method Detail

      • indexFolder

        public QuerySuggestManager.QuerySuggestManagerBuilder indexFolder​(Path indexFolder)
        Sets the root path where the indices for the different tenants will be stored. Required for LUCENE engine.
        Parameters:
        indexFolder - the root path where the indices for the different tenants will be stored.
        Returns:
        the changed builder
      • updateRate

        public QuerySuggestManager.QuerySuggestManagerBuilder updateRate​(int seconds)
        Set the rate (in seconds) at which the update should run. The value must be 5 <= x <= 3600. Default: 60
        Parameters:
        seconds - positive integer
        Returns:
        the changed builder
      • addDataProviderConfig

        public QuerySuggestManager.QuerySuggestManagerBuilder addDataProviderConfig​(String canonicalClassName,
                                                                                    Map<String,​Object> config)
        Add configuration for a specific data provider that will be loaded by your environment. It is only applied, if the according data provider is loaded.
        Parameters:
        canonicalClassName -
        config -
        Returns:
      • useDataMerger

        public QuerySuggestManager.QuerySuggestManagerBuilder useDataMerger()

        Per default for each provided data set, a single suggester is set up. If this flag is enabled, the MergingSuggestDataProvider will be used to merge all provided data for a given index.

        This approach is best suitable in these cases:

        • You want one data source to control the stop-words for all data sources
        • You don't need to filter on "natural tags" AND the "type tag" (only one works at a time)
        • You don't need the fuzzy matches: they don't work with filtering

        Also the data providers should deliver the data with the same locale setting (otherwise only the first locale is picked and a warning is logged).

        Returns:
        builder
        See Also:
        MergingSuggestDataProvider
      • preloadIndexes

        public QuerySuggestManager.QuerySuggestManagerBuilder preloadIndexes​(String... indexNames)
        specify indexes that should be loaded immediately after initialization.
        Parameters:
        indexNames - list of index names to be initialized synchronously when calling 'build()'
        Returns:
        the changed builder
      • addMetricsRegistryAdapter

        public QuerySuggestManager.QuerySuggestManagerBuilder addMetricsRegistryAdapter​(MeterRegistryAdapter reg)
        Optionally add micrometer.io MeterRegistry. An internal adapter is used in order to avoid ClassNotFound exception in case Micrometer is not on the classpath.
        Parameters:
        reg - adapter with the wanted meter registry
        Returns:
        the changed builder