Class IndexSettings


  • public final class IndexSettings
    extends Object
    Configuration properties common to all Hibernate Search indexes regardless of the underlying technology.

    Constants in this class are to be appended to a prefix to form a property key. The exact prefix will be either "hibernate.search.backend.indexes.<index name>." (for per-index settings) or "hibernate.search.backend." (for default index settings).

    • Method Detail

      • indexDefaultsKey

        @Deprecated
        public static String indexDefaultsKey​(String radical)
        Deprecated.
        To set defaults for a particular configuration property for all indexes in a backend, just set the configuration property at the backend level. E.g. instead of IndexSettings.indexDefaultsKey( "indexing.queue_size" ) use BackendSettings.backendKey( "indexing.queue_size" ).
        Builds a configuration property key for the index defaults of the default backend, with the given radical.

        See the javadoc of your backend for available radicals.

        Example result: "hibernate.search.backend.index_defaults.indexing.queue_size"
        Parameters:
        radical - The radical of the configuration property (see constants in ElasticsearchIndexSettings, LuceneIndexSettings, etc.)
        Returns:
        the concatenated default index settings key
      • indexKey

        public static String indexKey​(String indexName,
                                      String radical)
        Builds a configuration property key for the index of the given backend, with the given radical.

        See the javadoc of your backend for available radicals.

        Example result: "hibernate.search.backend.indexes.myIndex.indexing.queue_size"
        Parameters:
        indexName - The name of the index to configure.
        radical - The radical of the configuration property (see constants in ElasticsearchIndexSettings, LuceneIndexSettings, etc.)
        Returns:
        the concatenated index settings key
      • indexDefaultsKey

        @Deprecated
        public static String indexDefaultsKey​(String backendName,
                                              String radical)
        Deprecated.
        To set defaults for a particular configuration property for all indexes in a backend, just set the configuration property at the backend level. E.g. instead of IndexSettings.indexDefaultsKey( "myBackend", "indexing.queue_size" ) use BackendSettings.backendKey( "myBackend", "indexing.queue_size" ).
        Builds a configuration property key for the index defaults of the given backend, with the given radical.

        See the javadoc of your backend for available radicals.

        Example result: "hibernate.search.backends.myBackend.index_defaults.indexing.queue_size"
        Parameters:
        backendName - The name of the backend in which the indexes to configure are located.
        radical - The radical of the configuration property (see constants in ElasticsearchIndexSettings, LuceneIndexSettings, etc.)
        Returns:
        the concatenated default index settings key
      • indexKey

        public static String indexKey​(String backendName,
                                      String indexName,
                                      String radical)
        Builds a configuration property key for the index of the given backend, with the given radical.

        See the javadoc of your backend for available radicals.

        Example result: "hibernate.search.backends.<backendName>.indexes.<indexName>.indexing.queue_size"
        Parameters:
        backendName - The name of the backend in which the index to configure is located.
        indexName - The name of the index to configure.
        radical - The radical of the configuration property (see constants in ElasticsearchIndexSettings, LuceneIndexSettings, etc.)
        Returns:
        the concatenated index settings key