Class BackendSettings

java.lang.Object
org.hibernate.search.engine.cfg.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 Details

    • 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.

      Defaults:

      • If there is only one backend type in the classpath, defaults to that backend.
      • Otherwise, no default: this property must be set.
      See Also:
    • 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:
  • Method Details

    • 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