Class BackendSettings


  • public final class BackendSettings
    extends Object
    Configuration properties common to all Hibernate Search backends 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 depend on the integration, but should generally look like "hibernate.search.backends.<backend name>.".

    • Field Detail

      • TYPE

        public static final String TYPE
        The type of the backend.

        Only useful if you have more than one backend technology in the classpath; otherwise the backend type is automatically detected.

        Expects a String, such as "lucene" or "elasticsearch". See the documentation of your backend to find the appropriate value.

        No default: this property must be set.

        See Also:
        Constant Field Values
      • INDEXES

        public static final String INDEXES
        The root property whose children are index names, e.g. indexes.myIndex.<some index-scoped property> = bar.
        See Also:
        Constant Field Values
    • Method Detail

      • backendKey

        public static String backendKey​(String radical)
        Builds a configuration property key for the default backend, with the given radical.

        See the javadoc of your backend for available radicals.

        Example result: "hibernate.search.backend.thread_pool.size"
        Parameters:
        radical - The radical of the configuration property (see constants in * ElasticsearchBackendSettings, ElasticsearchBackendSettings, etc.)
        Returns:
        the concatenated prefix + radical
      • backendKey

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

        See the javadoc of your backend for available radicals.

        Example result: "hibernate.search.backend.myBackend.thread_pool.size"
        Parameters:
        backendName - The name of the backend to configure.
        radical - The radical of the configuration property (see constants in * ElasticsearchBackendSettings, ElasticsearchBackendSettings, etc.)
        Returns:
        the concatenated prefix + backend name + radical