Hibernate Search 中文操作指南

Appendix A: List of all available configuration properties

A.1. Hibernate Search Engine

hibernate.search.background_failure_handler

在后台进程(主要是索引操作)中发生的任何故障都应通知 FailureHandler 实例。

The FailureHandler instance that should be notified of any failure occurring in a background process (mainly index operations).

期望对类型 FailureHandler 的 bean 的引用。

Expects a reference to a bean of type FailureHandler.

默认为 EngineSettings.Defaults.BACKGROUND_FAILURE_HANDLER ,一个日志处理程序。

Defaults to EngineSettings.Defaults.BACKGROUND_FAILURE_HANDLER, a logging handler.

hibernate.search.configuration_property_checking.strategy

如何报告配置属性检查的结果。

How to report the results of configuration property checking.

配置属性检查将检测到从未使用的配置属性,这可能表示存在配置问题。

Configuration property checking will detect an configuration property that is never used, which might indicate a configuration issue.

期望 ConfigurationPropertyCheckingStrategyName 值或此类值的字符串表示形式。

Expects a ConfigurationPropertyCheckingStrategyName value, or a String representation of such value.

hibernate.search.backend.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.

期望得到一个字符串,例如“lucene”或“elasticsearch”。请参阅后端的文档以找到适当的值。

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.

此配置属性的变体(单击以打开) hibernate.search.backends.<backend-name>.type

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.type

A.2. Hibernate Search Backend - Lucene

hibernate.search.backend.analysis.configurer

分析配置程序。

The configurer for analysis.

期望对类型 LuceneAnalysisConfigurer 的 bean 的单值或多值引用。

Expects a single-valued or multi-valued reference to beans of type LuceneAnalysisConfigurer.

默认为无值。

Defaults to no value.

此配置属性的变体(单击以打开) hibernate.search.backends.<backend-name>.analysis.configurer

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.analysis.configurer

hibernate.search.backend.directory.filesystem_access.strategy

如何在目录中访问文件系统。

How to access the filesystem in the directory.

仅适用于“local-filesystem”目录类型

Only available for the "local-filesystem" directory type.

期望 FileSystemAccessStrategyName 值或此类值的字符串表示形式。

Expects a FileSystemAccessStrategyName value, or a String representation of such value.

此配置属性的变体(点击打开) hibernate.search.backend.indexes.<index-name>.directory.filesystem_access.strategy

Variants of this configuration property (click to open)hibernate.search.backend.indexes.<index-name>.directory.filesystem_access.strategy

hibernate.search.backends.<backend-name>.directory.filesystem_access.strategy

hibernate.search.backends.<backend-name>.directory.filesystem_access.strategy

hibernate.search.backends.<backend-name>.indexes.<index-name>.directory.filesystem_access.strategy

hibernate.search.backends.<backend-name>.indexes.<index-name>.directory.filesystem_access.strategy

hibernate.search.backend.directory.locking.strategy

锁定目录的方法。

How to lock on the directory.

期望一个 LockingStrategyName 值,或这种值得字符串表示。

Expects a LockingStrategyName value, or a String representation of such value.

默认为特定于每个目录类型。

Defaults are specific to each directory type.

此配置属性的变体(点击打开) hibernate.search.backend.indexes.<index-name>.directory.locking.strategy

Variants of this configuration property (click to open)hibernate.search.backend.indexes.<index-name>.directory.locking.strategy

hibernate.search.backends.<backend-name>.directory.locking.strategy

hibernate.search.backends.<backend-name>.directory.locking.strategy

hibernate.search.backends.<backend-name>.indexes.<index-name>.directory.locking.strategy

hibernate.search.backends.<backend-name>.indexes.<index-name>.directory.locking.strategy

hibernate.search.backend.directory.root

从索引中读取或写入时使用的文件系统根目录。

The filesystem root for the directory.

仅适用于“local-filesystem”目录类型

Only available for the "local-filesystem" directory type.

预期一个表示可读写模式中可访问现有目录的路径的字符串,如“local-filesystem”。

Expects a String representing a path to an existing directory accessible in read and write mode, such as "local-filesystem".

实际的索引文件将在目录 <root>/<index-name> 中创建。

The actual index files will be created in directory <root>/<index-name>.

默认为 JVM 工作目录。

Defaults to the JVM’s working directory.

默认值:"."

Default value: "."

此配置属性的变体(点击打开) hibernate.search.backend.indexes.<index-name>.directory.root

Variants of this configuration property (click to open)hibernate.search.backend.indexes.<index-name>.directory.root

hibernate.search.backends.<backend-name>.directory.root

hibernate.search.backends.<backend-name>.directory.root

hibernate.search.backends.<backend-name>.indexes.<index-name>.directory.root

hibernate.search.backends.<backend-name>.indexes.<index-name>.directory.root

hibernate.search.backend.directory.type

从索引读取或写入时使用的目录类型。

The type of directory to use when reading from or writing to the index.

预期一个字符串,如“local-filesystem”。请参阅参考文档获取可用值列表。

Expects a String, such as "local-filesystem". See the reference documentation for a list of available values.

默认值:"local-filesystem"

Default value: "local-filesystem"

此配置属性的变体(点击打开) hibernate.search.backend.indexes.<index-name>.directory.type

Variants of this configuration property (click to open)hibernate.search.backend.indexes.<index-name>.directory.type

hibernate.search.backends.<backend-name>.directory.type

hibernate.search.backends.<backend-name>.directory.type

hibernate.search.backends.<backend-name>.indexes.<index-name>.directory.type

hibernate.search.backends.<backend-name>.indexes.<index-name>.directory.type

hibernate.search.backend.indexing.queue_count

分配给每个索引(或启用碎片时每个索引的每个碎片)的索引队列数量。

The number of indexing queues assigned to each index (or each shard of each index, when sharding is enabled).

预期一个严格正整数值或一个可解析为整数的字符串。

Expects a strictly positive integer value, or a string that can be parsed into an integer value.

有关此设置及其影响的更多信息,请参阅参考文档,“Lucene 后端 - 索引”章节。

See the reference documentation, section "Lucene backend - Indexing", for more information about this setting and its implications.

默认值:10

Default value: 10

此配置属性的变体(点击以打开) hibernate.search.backend.indexes.<index-name>.indexing.queue_count

Variants of this configuration property (click to open)hibernate.search.backend.indexes.<index-name>.indexing.queue_count

hibernate.search.backends.<backend-name>.indexing.queue_count

hibernate.search.backends.<backend-name>.indexing.queue_count

hibernate.search.backends.<backend-name>.indexes.<index-name>.indexing.queue_count

hibernate.search.backends.<backend-name>.indexes.<index-name>.indexing.queue_count

hibernate.search.backend.indexing.queue_size

索引队列的大小。

The size of indexing queues.

预期一个严格正整数值或一个可解析为整数的字符串。

Expects a strictly positive integer value, or a string that can be parsed into an integer value.

有关此设置及其影响的更多信息,请参阅参考文档,“Lucene 后端 - 索引”章节。

See the reference documentation, section "Lucene backend - Indexing", for more information about this setting and its implications.

默认值:1000

Default value: 1000

此配置属性的变体(点击以打开) hibernate.search.backend.indexes.<index-name>.indexing.queue_size

Variants of this configuration property (click to open)hibernate.search.backend.indexes.<index-name>.indexing.queue_size

hibernate.search.backends.<backend-name>.indexing.queue_size

hibernate.search.backends.<backend-name>.indexing.queue_size

hibernate.search.backends.<backend-name>.indexes.<index-name>.indexing.queue_size

hibernate.search.backends.<backend-name>.indexes.<index-name>.indexing.queue_size

hibernate.search.backend.io.commit_interval

从索引更改到该更改提交之前可以经过多长时间。

How much time may pass after an index change until the change is committed.

仅适用于“近实时”I/O 策略。

Only available for the "near-real-time" I/O strategy.

这实际上定义了更改可能在“不安全”状态下存在多长时间,在这种状态下,崩溃或电源故障将导致数据丢失。例如:

This effectively defines how long changes may be in an "unsafe" state, where a crash or power loss will result in data loss. For example:

如果设置为 0,则在后台进程完成一批更改的处理后,更改是安全的。

if set to 0, changes are safe as soon as the background process finishes treating a batch of changes.

如果设置为 1000,则在后台进程完成一批更改的处理后,可能会再延迟 1 秒,更改才算安全。不过,它有一个好处:在另一个更改后不到 1 秒发生的索引更改可能会执行得更快。

if set to 1000, changes may not be safe for an additional 1 second after the background process finishes treating a batch. There is a benefit, though: index changes occurring less than 1 second after another change may execute faster.

请注意,单个写操作可能会触发强制提交(例如,ORM 映射器中的 write-syncsync 索引计划同步策略),在这种情况下,您只会在密集索引(批量索引器,…​)期间从一个非零提交间隔中受益。

Note that individual write operations may trigger a forced commit (for example with the write-sync and sync indexing plan synchronization strategies in the ORM mapper), in which case you will only benefit from a non-zero commit interval during intensive indexing (mass indexer, …​).

请注意,提交不必为了对搜索查询进行更改而使这些更改可见:这两个概念是无关的。请参阅 IO_REFRESH_INTERVAL

Note that committing is not necessary to make changes visible to search queries: the two concepts are unrelated. See IO_REFRESH_INTERVAL.

期望以毫秒为单位的正整数,例如 1000,或可以解析为该整数的字符串。

Expects a positive Integer value in milliseconds, such as 1000, or a String that can be parsed into such Integer value.

默认值:1000

Default value: 1000

此配置属性的变体(点击以打开) hibernate.search.backend.indexes.<index-name>.io.commit_interval

Variants of this configuration property (click to open)hibernate.search.backend.indexes.<index-name>.io.commit_interval

hibernate.search.backends.<backend-name>.io.commit_interval

hibernate.search.backends.<backend-name>.io.commit_interval

hibernate.search.backends.<backend-name>.indexes.<index-name>.io.commit_interval

hibernate.search.backends.<backend-name>.indexes.<index-name>.io.commit_interval

hibernate.search.backend.io.merge.calibrate_by_deletes

期望一个布尔值,例如 truefalse,或可以解析为该布尔值的字符串。

Expects a Boolean value such as true or false, or a String that can be parsed into such Boolean value.

此设置的默认值由 Lucene 定义。

The default for this setting is defined by Lucene.

此配置属性的变体(点击以打开) hibernate.search.backend.indexes.<index-name>.io.merge.calibrate_by_deletes

Variants of this configuration property (click to open)hibernate.search.backend.indexes.<index-name>.io.merge.calibrate_by_deletes

hibernate.search.backends.<backend-name>.io.merge.calibrate_by_deletes

hibernate.search.backends.<backend-name>.io.merge.calibrate_by_deletes

hibernate.search.backends.<backend-name>.indexes.<index-name>.io.merge.calibrate_by_deletes

hibernate.search.backends.<backend-name>.indexes.<index-name>.io.merge.calibrate_by_deletes

hibernate.search.backend.io.merge.factor

要传递给 LogMergePolicy.setMergeFactor(int) 的值。

The value to pass to LogMergePolicy.setMergeFactor(int).

期望一个正整数,或可以解析为该整数的字符串。

Expects a positive Integer value, or a String that can be parsed into such Integer value.

此设置的默认值由 Lucene 定义。

The default for this setting is defined by Lucene.

此配置属性的变体(单击打开) hibernate.search.backend.indexes.<index-name>.io.merge.factor

Variants of this configuration property (click to open)hibernate.search.backend.indexes.<index-name>.io.merge.factor

hibernate.search.backends.<backend-name>.io.merge.factor

hibernate.search.backends.<backend-name>.io.merge.factor

hibernate.search.backends.<backend-name>.indexes.<index-name>.io.merge.factor

hibernate.search.backends.<backend-name>.indexes.<index-name>.io.merge.factor

hibernate.search.backend.io.merge.max_docs

The value to pass to LogMergePolicy.setMaxMergeDocs(int).

期望一个正整数,或可以解析为该整数的字符串。

Expects a positive Integer value, or a String that can be parsed into such Integer value.

此设置的默认值由 Lucene 定义。

The default for this setting is defined by Lucene.

此配置属性的变体(单击打开) hibernate.search.backend.indexes.<index-name>.io.merge.max_docs

Variants of this configuration property (click to open)hibernate.search.backend.indexes.<index-name>.io.merge.max_docs

hibernate.search.backends.<backend-name>.io.merge.max_docs

hibernate.search.backends.<backend-name>.io.merge.max_docs

hibernate.search.backends.<backend-name>.indexes.<index-name>.io.merge.max_docs

hibernate.search.backends.<backend-name>.indexes.<index-name>.io.merge.max_docs

hibernate.search.backend.io.merge.max_forced_size

期望以兆字节为单位的正整数,或可以解析为该整数的字符串。

Expects a positive Integer value in megabytes, or a String that can be parsed into such Integer value.

此设置的默认值由 Lucene 定义。

The default for this setting is defined by Lucene.

此配置属性的变体(单击打开) hibernate.search.backend.indexes.<index-name>.io.merge.max_forced_size

Variants of this configuration property (click to open)hibernate.search.backend.indexes.<index-name>.io.merge.max_forced_size

hibernate.search.backends.<backend-name>.io.merge.max_forced_size

hibernate.search.backends.<backend-name>.io.merge.max_forced_size

hibernate.search.backends.<backend-name>.indexes.<index-name>.io.merge.max_forced_size

hibernate.search.backends.<backend-name>.indexes.<index-name>.io.merge.max_forced_size

hibernate.search.backend.io.merge.max_size

期望以兆字节为单位的正整数,或可以解析为该整数的字符串。

Expects a positive Integer value in megabytes, or a String that can be parsed into such Integer value.

此设置的默认值由 Lucene 定义。

The default for this setting is defined by Lucene.

此配置属性的变体(单击打开) hibernate.search.backend.indexes.<index-name>.io.merge.max_size

Variants of this configuration property (click to open)hibernate.search.backend.indexes.<index-name>.io.merge.max_size

hibernate.search.backends.<backend-name>.io.merge.max_size

hibernate.search.backends.<backend-name>.io.merge.max_size

hibernate.search.backends.<backend-name>.indexes.<index-name>.io.merge.max_size

hibernate.search.backends.<backend-name>.indexes.<index-name>.io.merge.max_size

hibernate.search.backend.io.merge.min_size

期望以兆字节为单位的正整数,或可以解析为该整数的字符串。

Expects a positive Integer value in megabytes, or a String that can be parsed into such Integer value.

此设置的默认值由 Lucene 定义。

The default for this setting is defined by Lucene.

此配置属性的变体(单击打开) hibernate.search.backend.indexes.<index-name>.io.merge.min_size

Variants of this configuration property (click to open)hibernate.search.backend.indexes.<index-name>.io.merge.min_size

hibernate.search.backends.<backend-name>.io.merge.min_size

hibernate.search.backends.<backend-name>.io.merge.min_size

hibernate.search.backends.<backend-name>.indexes.<index-name>.io.merge.min_size

hibernate.search.backends.<backend-name>.indexes.<index-name>.io.merge.min_size

hibernate.search.backend.io.refresh_interval

在索引读入器被视为已失效并重新创建之前,索引写入之后可能经过多长时间。

How much time may pass after an index write until the index reader is considered stale and re-created.

仅适用于“近实时”I/O 策略。

Only available for the "near-real-time" I/O strategy.

这实际上定义了过时的搜索查询结果可能存在多长时间。例如:

This effectively defines how out-of-date search query results may be. For example:

如果设置为 0,则搜索结果将始终与索引写入完全同步。

If set to 0, search results will always be completely in sync with the index writes.

如果设置为 1000,则搜索结果可能反映最多 1 秒前的索引状态。不过,它有一个好处:当频繁写入索引时,在另一个查询后不到 1 秒执行的搜索查询可能会执行得更快。

If set to 1000, search results may reflect the state of the index at most 1 second ago. There is a benefit, though: in situations where the index is being frequently written to, search queries executed less than 1 second after another query may execute faster.

请注意,单个写操作可能會触发強制刷新(例如,ORM 映射器中的 read-syncsync 索引計劃同步策略),在这种情况下,您只能在密集索引(批量索引器,…​)期间从一個非零刷新间隔中受益。

Note that individual write operations may trigger a forced refresh (for example with the read-sync and sync indexing plan synchronization strategies in the ORM mapper), in which case you will only benefit from a non-zero refresh interval during intensive indexing (mass indexer, …​).

期望以毫秒为单位的正整数,例如 1000,或可以解析为该整数的字符串。

Expects a positive Integer value in milliseconds, such as 1000, or a String that can be parsed into such Integer value.

默认值:0

Default value: 0

此配置属性的变体(单击以打开) hibernate.search.backend.indexes.<index-name>.io.refresh_interval

Variants of this configuration property (click to open)hibernate.search.backend.indexes.<index-name>.io.refresh_interval

hibernate.search.backends.<backend-name>.io.refresh_interval

hibernate.search.backends.<backend-name>.io.refresh_interval

hibernate.search.backends.<backend-name>.indexes.<index-name>.io.refresh_interval

hibernate.search.backends.<backend-name>.indexes.<index-name>.io.refresh_interval

hibernate.search.backend.io.strategy

如何处理输入/输出,即如何写入和读取索引。

How to handle input/output, i.e. how to write to and read from indexes.

期待有一个 IOStrategyName 值或此类值的字符串表示。

Expects a IOStrategyName value, or a String representation of such value.

此配置属性的变体(单击以打开) hibernate.search.backend.indexes.<index-name>.io.strategy

Variants of this configuration property (click to open)hibernate.search.backend.indexes.<index-name>.io.strategy

hibernate.search.backends.<backend-name>.io.strategy

hibernate.search.backends.<backend-name>.io.strategy

hibernate.search.backends.<backend-name>.indexes.<index-name>.io.strategy

hibernate.search.backends.<backend-name>.indexes.<index-name>.io.strategy

hibernate.search.backend.io.writer.infostream

是否记录 IndexWriterConfig.setInfoStream(InfoStream) (在跟踪级别),如果不记录,请单击“否”。

Whether to log the IndexWriterConfig.setInfoStream(InfoStream) (at the trace level) or not.

日志附加到记录器“org.hibernate.search.backend.lucene.infostream”。

Logs are appended to the logger "org.hibernate.search.backend.lucene.infostream".

期望一个布尔值,例如 truefalse,或可以解析为该布尔值的字符串。

Expects a Boolean value such as true or false, or a String that can be parsed into such Boolean value.

默认值为 false

Default is false.

此配置属性的变体(单击以打开) hibernate.search.backend.indexes.<index-name>.io.writer.infostream

Variants of this configuration property (click to open)hibernate.search.backend.indexes.<index-name>.io.writer.infostream

hibernate.search.backends.<backend-name>.io.writer.infostream

hibernate.search.backends.<backend-name>.io.writer.infostream

hibernate.search.backends.<backend-name>.indexes.<index-name>.io.writer.infostream

hibernate.search.backends.<backend-name>.indexes.<index-name>.io.writer.infostream

hibernate.search.backend.io.writer.max_buffered_docs

期望一个正整数,或可以解析为该整数的字符串。

Expects a positive Integer value, or a String that can be parsed into such Integer value.

此设置的默认值由 Lucene 定义。

The default for this setting is defined by Lucene.

此配置属性的变体(单击以打开) hibernate.search.backend.indexes.<index-name>.io.writer.max_buffered_docs

Variants of this configuration property (click to open)hibernate.search.backend.indexes.<index-name>.io.writer.max_buffered_docs

hibernate.search.backends.<backend-name>.io.writer.max_buffered_docs

hibernate.search.backends.<backend-name>.io.writer.max_buffered_docs

hibernate.search.backends.<backend-name>.indexes.<index-name>.io.writer.max_buffered_docs

hibernate.search.backends.<backend-name>.indexes.<index-name>.io.writer.max_buffered_docs

hibernate.search.backend.io.writer.ram_buffer_size

期望以兆字节为单位的正整数,或可以解析为该整数的字符串。

Expects a positive Integer value in megabytes, or a String that can be parsed into such Integer value.

此设置的默认值由 Lucene 定义。

The default for this setting is defined by Lucene.

此配置属性的变量(单击以打开) hibernate.search.backend.indexes.<index-name>.io.writer.ram_buffer_size

Variants of this configuration property (click to open)hibernate.search.backend.indexes.<index-name>.io.writer.ram_buffer_size

hibernate.search.backends.<backend-name>.io.writer.ram_buffer_size

hibernate.search.backends.<backend-name>.io.writer.ram_buffer_size

hibernate.search.backends.<backend-name>.indexes.<index-name>.io.writer.ram_buffer_size

hibernate.search.backends.<backend-name>.indexes.<index-name>.io.writer.ram_buffer_size

hibernate.search.backend.lucene_version

创建分析器时传递给分析器的 Lucene 版本。

The Lucene version to passed to analyzers when they are created.

当升级 Lucene 时,应该设置此项以获得一致的行为。

This should be set in order to get consistent behavior when Lucene is upgraded.

期望一个 Lucene Version 对象或 Version.parseLeniently(java.lang.String) 接受的字符串

Expects a Lucene Version object, or a String accepted by Version.parseLeniently(java.lang.String)

默认为 LuceneBackendSettings.Defaults.LUCENE_VERSION ,在升级 Hibernate Search 或 Lucene 时可能会更改,因此不提供任何向后兼容性保证。建议的方法是将此属性显式设置为要定位的 Lucene 版本。

Defaults to LuceneBackendSettings.Defaults.LUCENE_VERSION, which may change when Hibernate Search or Lucene is upgraded, and therefore does not offer any backwards-compatibility guarantees. The recommended approach is to set this property explicitly to the version of Lucene you want to target.

此配置属性的变量(单击以打开) hibernate.search.backends.<backend-name>.lucene_version

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.lucene_version

hibernate.search.backend.multi_tenancy.strategy

如何实现多租户。

How to implement multi-tenancy.

期望 MultiTenancyStrategyName 值或此类值的字符串表示形式。

Expects a MultiTenancyStrategyName value, or a String representation of such value.

此配置属性的变量(单击以打开) hibernate.search.backends.<backend-name>.multi_tenancy.strategy

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.multi_tenancy.strategy

hibernate.search.backend.query.caching.configurer

查询缓存配置器。

The configurer for query caching.

期望对 QueryCachingConfigurer 类型 bean 的单值或多值引用。

Expects a single-valued or multi-valued reference to beans of type QueryCachingConfigurer.

默认为无值。

Defaults to no value.

此配置属性的变量(单击以打开) hibernate.search.backends.<backend-name>.query.caching.configurer

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.query.caching.configurer

hibernate.search.backend.sharding.number_of_shards

要为索引创建的分片数量,即“物理”索引的数量,每个索引都保存索引数据的一部分。

The number of shards to create for the index, i.e. the number of "physical" indexes, each holding a part of the index data.

仅适用于 hash sharding strategy

Only available for the hash sharding strategy.

需要一个严格的正整数,例如 4,或可以解析成该整数值的字符串。

Expects a strictly positive Integer value, such as 4, or a String that can be parsed into such Integer value.

没有默认值:在使用 hash 分片策略时此属性必须设置。

No default: this property must be set when using the hash sharding strategy.

此配置属性的变量(单击以打开) hibernate.search.backend.indexes.<index-name>.sharding.number_of_shards

Variants of this configuration property (click to open)hibernate.search.backend.indexes.<index-name>.sharding.number_of_shards

hibernate.search.backends.<backend-name>.sharding.number_of_shards

hibernate.search.backends.<backend-name>.sharding.number_of_shards

hibernate.search.backends.<backend-name>.indexes.<index-name>.sharding.number_of_shards

hibernate.search.backends.<backend-name>.indexes.<index-name>.sharding.number_of_shards

hibernate.search.backend.sharding.shard_identifiers

接受索引的分片标识符列表。

The list of shard identifiers to accept for the index.

仅适用于 explicit sharding strategy

Only available for the explicit sharding strategy.

需要一个包含多个分片标识符(以 “,” 分隔)的字符串,或一个包含这些分片标识符的 Collection<String>

Expects either a String containing multiple shard identifiers separated by commas (','), or a Collection<String> containing such shard identifiers.

没有默认值:在使用 explicit 分片策略时此属性必须设置。

No default: this property must be set when using the explicit sharding strategy.

此配置属性的变体(单击以打开) hibernate.search.backend.indexes.<index-name>.sharding.shard_identifiers

Variants of this configuration property (click to open)hibernate.search.backend.indexes.<index-name>.sharding.shard_identifiers

hibernate.search.backends.<backend-name>.sharding.shard_identifiers

hibernate.search.backends.<backend-name>.sharding.shard_identifiers

hibernate.search.backends.<backend-name>.indexes.<index-name>.sharding.shard_identifiers

hibernate.search.backends.<backend-name>.indexes.<index-name>.sharding.shard_identifiers

hibernate.search.backend.sharding.strategy

分片策略,可决定分片数、分片标识符以及如何将路由键转换为分片标识符。

The sharding strategy, deciding the number of shards, their identifiers, and how to translate a routing key into a shard identifier.

需要一个字符串,例如 “hash”。有关可用值列表,请参见参考文档。

Expects a String, such as "hash". See the reference documentation for a list of available values.

默认为 LuceneIndexSettings.Defaults.SHARDING_STRATEGY (无分片)。

默认值:"none"

Default value: "none"

此配置属性的变体(点击以打开) hibernate.search.backend.indexes.<index-name>.sharding.strategy

Variants of this configuration property (click to open)hibernate.search.backend.indexes.<index-name>.sharding.strategy

hibernate.search.backends.<backend-name>.sharding.strategy

hibernate.search.backends.<backend-name>.sharding.strategy

hibernate.search.backends.<backend-name>.indexes.<index-name>.sharding.strategy

hibernate.search.backends.<backend-name>.indexes.<index-name>.sharding.strategy

hibernate.search.backend.thread_pool.size

分配给后端的线程池的大小。

The size of the thread pool assigned to the backend.

预期一个严格正整数值或一个可解析为整数的字符串。

Expects a strictly positive integer value, or a string that can be parsed into an integer value.

有关此设置及其含义的更多信息,请参见参考文档,“Lucene 后端 - 线程”部分。

See the reference documentation, section "Lucene backend - Threads", for more information about this setting and its implications.

默认为 JVM 启动时可用的处理器内核数量。

Defaults to the number of processor cores available to the JVM on startup.

此配置属性的变体(点击以打开) hibernate.search.backends.<backend-name>.thread_pool.size

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.thread_pool.size

A.3. Hibernate Search Backend - Elasticsearch

hibernate.search.backend.analysis.configurer

应用于此索引的分析配置器。

The analysis configurer applied to this index.

期望对于类型为 ElasticsearchAnalysisConfigurer 的 bean 来讲,是单值或多值的引用。

Expects a single-valued or multi-valued reference to beans of type ElasticsearchAnalysisConfigurer.

默认为无值。

Defaults to no value.

此配置属性的变体(点击以打开) hibernate.search.backend.indexes.<index-name>.analysis.configurer

Variants of this configuration property (click to open)hibernate.search.backend.indexes.<index-name>.analysis.configurer

hibernate.search.backends.<backend-name>.analysis.configurer

hibernate.search.backends.<backend-name>.analysis.configurer

hibernate.search.backends.<backend-name>.indexes.<index-name>.analysis.configurer

hibernate.search.backends.<backend-name>.indexes.<index-name>.analysis.configurer

hibernate.search.backend.client.configurer

一个 ElasticsearchHttpClientConfigurer ,该 ElasticsearchHttpClientConfigurer 定义自定义的 HTTP 客户端配置。

A ElasticsearchHttpClientConfigurer that defines custom HTTP client configuration.

它可以例如用于调整 SSL 上下文以接受自签名证书。它允许覆盖其他 HTTP 客户端设置,例如 USERNAMEMAX_CONNECTIONS_PER_ROUTE

It can be used for example to tune the SSL context to accept self-signed certificates. It allows overriding other HTTP client settings, such as USERNAME or MAX_CONNECTIONS_PER_ROUTE.

要求引用类型为 ElasticsearchHttpClientConfigurer 的 bean。

Expects a reference to a bean of type ElasticsearchHttpClientConfigurer.

默认为无值。

Defaults to no value.

此配置属性的变量(单击打开) hibernate.search.backends.<backend-name>.client.configurer

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.client.configurer

hibernate.search.backend.connection_timeout

与 Elasticsearch 服务器建立连接时的超时时间。

The timeout when establishing a connection to an Elasticsearch server.

需要毫秒为单位的正整数,例如 3000,或可以解析成该整数值的字符串。

Expects a positive Integer value in milliseconds, such as 3000, or a String that can be parsed into such Integer value.

默认值:1000

Default value: 1000

此配置属性的变量(单击打开) hibernate.search.backends.<backend-name>.connection_timeout

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.connection_timeout

hibernate.search.backend.discovery.enabled

是否启用了自动发现 Elasticsearch 集群中的节点。

Whether automatic discovery of nodes in the Elasticsearch cluster is enabled.

需要布尔值,例如 truefalse,或可解析为布尔值的字符串。

Expects a Boolean value such as true or false, or a string that can be parsed into a Boolean value.

默认值:false

Default value: false

此配置属性的变量(单击打开) hibernate.search.backends.<backend-name>.discovery.enabled

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.discovery.enabled

hibernate.search.backend.discovery.refresh_interval

如果启用了自动发现,两次执行之间的时间间隔。

The time interval between two executions of the automatic discovery, if enabled.

需要以秒为单位的正整数,例如 2,或可解析为该类整数的字符串。

Expects a positive Integer value in seconds, such as 2, or a String that can be parsed into such Integer value.

默认值:10

Default value: 10

此配置属性的变量(单击打开) hibernate.search.backends.<backend-name>.discovery.refresh_interval

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.discovery.refresh_interval

hibernate.search.backend.dynamic_mapping

Elasticsearch 映射中 dynamic_mapping 属性的默认值。

The default for the dynamic_mapping attribute in the Elasticsearch mapping.

在具有字段模板的动态字段中,此设置会被忽略,因为字段模板将 dynamic_mapping 强制为 DynamicMapping.TRUE

In case of dynamic fields with field templates, this setting will be ignored, since field templates force dynamic_mapping to DynamicMapping.TRUE.

此配置属性的变量(单击打开) hibernate.search.backend.indexes.<index-name>.dynamic_mapping

Variants of this configuration property (click to open)hibernate.search.backend.indexes.<index-name>.dynamic_mapping

hibernate.search.backends.<backend-name>.dynamic_mapping

hibernate.search.backends.<backend-name>.dynamic_mapping

hibernate.search.backends.<backend-name>.indexes.<index-name>.dynamic_mapping

hibernate.search.backends.<backend-name>.indexes.<index-name>.dynamic_mapping

hibernate.search.backend.hosts

要连接的 Elasticsearch 服务器的主机名和端口。

The hostname and ports of the Elasticsearch servers to connect to.

需要一个表示主机名和端口的字符串,例如 localhostes.mycompany.com:4400,或包含多个用逗号分隔的此类主机名和端口字符串的字符串,或一个包含此类主机名和端口字符串的 Collection<String>

Expects a String representing a hostname and port such as localhost or es.mycompany.com:4400, or a String containing multiple such hostname-and-port strings separated by commas, or a Collection<String> containing such hostname-and-port strings.

可指定多个服务器用于负载均衡:请求将依次分配给每个主机。

Multiple servers may be specified for load-balancing: requests will be assigned to each host in turns.

同时设置此属性和 URIS 会导致启动时抛出一个异常。

Setting this property at the same time as URIS will lead to an exception being thrown on startup.

此配置属性的变体(单击可展开) hibernate.search.backends.<backend-name>.hosts

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.hosts

hibernate.search.backend.indexing.max_bulk_size

在处理索引队列时创建的批量请求的最大大小。

The maximum size of bulk requests created when processing indexing queues.

预期一个严格正整数值或一个可解析为整数的字符串。

Expects a strictly positive integer value, or a string that can be parsed into an integer value.

有关于此设置及其含义的详细信息,请参见参考文档,“Elasticsearch 后端 - 索引”部分。

See the reference documentation, section "Elasticsearch backend - Indexing", for more information about this setting and its implications.

默认值:100

Default value: 100

此配置属性的变体(单击可展开) hibernate.search.backend.indexes.<index-name>.indexing.max_bulk_size

Variants of this configuration property (click to open)hibernate.search.backend.indexes.<index-name>.indexing.max_bulk_size

hibernate.search.backends.<backend-name>.indexing.max_bulk_size

hibernate.search.backends.<backend-name>.indexing.max_bulk_size

hibernate.search.backends.<backend-name>.indexes.<index-name>.indexing.max_bulk_size

hibernate.search.backends.<backend-name>.indexes.<index-name>.indexing.max_bulk_size

hibernate.search.backend.indexing.queue_count

分配给每个索引的索引队列数量。

The number of indexing queues assigned to each index.

预期一个严格正整数值或一个可解析为整数的字符串。

Expects a strictly positive integer value, or a string that can be parsed into an integer value.

有关于此设置及其含义的详细信息,请参见参考文档,“Elasticsearch 后端 - 索引”部分。

See the reference documentation, section "Elasticsearch backend - Indexing", for more information about this setting and its implications.

默认值:10

Default value: 10

此配置属性的变体(点击以打开) hibernate.search.backend.indexes.<index-name>.indexing.queue_count

Variants of this configuration property (click to open)hibernate.search.backend.indexes.<index-name>.indexing.queue_count

hibernate.search.backends.<backend-name>.indexing.queue_count

hibernate.search.backends.<backend-name>.indexing.queue_count

hibernate.search.backends.<backend-name>.indexes.<index-name>.indexing.queue_count

hibernate.search.backends.<backend-name>.indexes.<index-name>.indexing.queue_count

hibernate.search.backend.indexing.queue_size

索引队列的大小。

The size of indexing queues.

预期一个严格正整数值或一个可解析为整数的字符串。

Expects a strictly positive integer value, or a string that can be parsed into an integer value.

有关于此设置及其含义的详细信息,请参见参考文档,“Elasticsearch 后端 - 索引”部分。

See the reference documentation, section "Elasticsearch backend - Indexing", for more information about this setting and its implications.

默认值:1000

Default value: 1000

此配置属性的变体(点击以打开) hibernate.search.backend.indexes.<index-name>.indexing.queue_size

Variants of this configuration property (click to open)hibernate.search.backend.indexes.<index-name>.indexing.queue_size

hibernate.search.backends.<backend-name>.indexing.queue_size

hibernate.search.backends.<backend-name>.indexing.queue_size

hibernate.search.backends.<backend-name>.indexes.<index-name>.indexing.queue_size

hibernate.search.backends.<backend-name>.indexes.<index-name>.indexing.queue_size

hibernate.search.backend.layout.strategy

如何确定索引名称和别名。

How to determine index names and aliases.

预期一个类型为 IndexLayoutStrategy 的 Bean 的引用。

Expects a reference to a bean of type IndexLayoutStrategy.

默认为 simple 策略:

Defaults to the simple strategy:

非别名名称遵循格式 <hibernateSearchIndexName>-<6 digits>

The non-alias name follows the format <hibernateSearchIndexName>-<6 digits>

写别名遵循格式 <hibernateSearchIndexName>-write

The write alias follows the format <hibernateSearchIndexName>-write

读别名遵循格式 <hibernateSearchIndexName>-read

The read alias follows the format <hibernateSearchIndexName>-read

此配置属性的变体(单击可展开) hibernate.search.backends.<backend-name>.layout.strategy

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.layout.strategy

hibernate.search.backend.log.json_pretty_printing

日志中包含的 JSON 是否应漂亮打印(缩进,带换行符)。

Whether JSON included in logs should be pretty-printed (indented, with line breaks).

需要布尔值,例如 truefalse,或可解析为布尔值的字符串。

Expects a Boolean value such as true or false, or a string that can be parsed into a Boolean value.

默认值:false

Default value: false

此配置属性的变量(单击打开) hibernate.search.backends.<backend-name>.log.json_pretty_printing

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.log.json_pretty_printing

hibernate.search.backend.mapping.type_name.strategy

如何将文档映射到其类型名称,即如何在搜索命中中确定文档的类型名称。

How to map documents to their type name, i.e. how to determine the type name of a document in search hits.

需要 TypeNameMappingStrategyName 值或此类值的字符串表示形式。

Expects a TypeNameMappingStrategyName value, or a String representation of such value.

此配置属性的变量(单击打开) hibernate.search.backends.<backend-name>.mapping.type_name.strategy

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.mapping.type_name.strategy

hibernate.search.backend.max_connections

到 Elasticsearch 集群的所有主机的最大同时连接数。

The maximum number of simultaneous connections to the Elasticsearch cluster, all hosts taken together.

预期值为正整数,例如 20 或可被解析为这类整数的字符串。

Expects a positive Integer value, such as 20, or a String that can be parsed into such Integer value.

默认值:20

Default value: 20

此配置属性的变量(单击打开) hibernate.search.backends.<backend-name>.max_connections

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.max_connections

hibernate.search.backend.max_connections_per_route

到 Elasticsearch 集群的每个主机的最大同时连接数。

The maximum number of simultaneous connections to each host of the Elasticsearch cluster.

预期值为正整数,例如 10 或可被解析为这类整数的字符串。

Expects a positive Integer value, such as 10, or a String that can be parsed into such Integer value.

默认值:10

Default value: 10

此配置属性的变量(单击打开) hibernate.search.backends.<backend-name>.max_connections_per_route

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.max_connections_per_route

hibernate.search.backend.max_keep_alive

连接到 Elasticsearch 集群的连接可以闲置多长时间。

How long connections to the Elasticsearch cluster can be kept idle.

预期值为以毫秒为单位的正长整型值,例如 60000,或可被解析为这类整数的字符串。

Expects a positive Long value of milliseconds, such as 60000, or a String that can be parsed into such Integer value.

如果 Elasticsearch 集群的响应包含 Keep-Alive 标头,则有效最大空闲时间为 Keep-Alive 标头或此属性的值(如果已设置)中较低的一个。

If the response from an Elasticsearch cluster contains a Keep-Alive header, then the effective max idle time will be whichever is lower: the duration from the Keep-Alive header or the value of this property (if set).

如果未设置此属性,则仅考虑 Keep-Alive 标头,如果它不存在,则空闲连接将永久保留。

If this property is not set, only the Keep-Alive header is considered, and if it’s absent, idle connections will be kept forever.

此配置属性的变量(单击打开) hibernate.search.backends.<backend-name>.max_keep_alive

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.max_keep_alive

hibernate.search.backend.multi_tenancy.strategy

如何实现多租户。

How to implement multi-tenancy.

需要 MultiTenancyStrategyName 值或此类值的字符串表示形式。

Expects a MultiTenancyStrategyName value, or a String representation of such value.

此配置属性的变量(单击以打开) hibernate.search.backends.<backend-name>.multi_tenancy.strategy

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.multi_tenancy.strategy

hibernate.search.backend.password

连接到 Elasticsearch 服务器(HTTP 身份验证)时发送的密码。

The password to send when connecting to the Elasticsearch servers (HTTP authentication).

预期值为字符串。

Expects a String.

默认情况下不使用用户名(匿名访问)。

Defaults to no username (anonymous access).

此配置属性的变量(单击打开) hibernate.search.backends.<backend-name>.password

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.password

hibernate.search.backend.path_prefix

用于指定添加到请求端点的路径前缀的属性。如果你的 Elasticsearch 实例位于特定上下文路径,请使用路径前缀。

Property for specifying the path prefix prepended to the request end point. Use the path prefix if your Elasticsearch instance is located at a specific context path.

默认值:""

Default value: ""

此配置属性的变式(点击打开) hibernate.search.backends.<backend-name>.path_prefix

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.path_prefix

hibernate.search.backend.protocol

连接到 Elasticsearch 服务器时要使用的协议。

The protocol to use when connecting to the Elasticsearch servers.

预期值为字符串:httphttps

Expects a String: either http or https.

同时设置此属性和 URIS 会导致启动时抛出一个异常。

Setting this property at the same time as URIS will lead to an exception being thrown on startup.

默认值:"http"

Default value: "http"

此配置属性的变式(点击打开) hibernate.search.backends.<backend-name>.protocol

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.protocol

hibernate.search.backend.query.shard_failure.ignore

此属性定义是否忽略部分分片故障。

This property defines if partial shard failures are ignored.

万一所有分片都失败,Elasticsearch 集群自己会返回一个 400 状态代码,但如果仅部分分片失败,那么客户端将从成功的分片处收到一个成功的部分响应。

In case all shards fail, Elasticsearch cluster will return a 400 status code itself, but if only some of the shards fail, then the client will receive a successful partial response from the shards that were successful.

为了避免获得任何部分结果,此设置可以设置为_false_。而如果应当忽略部分故障并将其视为有效结果,则应将该值设置为_true_。

To prevent getting any partial results this setting can be set to false. While if the partial failures should be ignored and considered as valid results then the value should be set to true.

需要布尔值,例如 truefalse,或可解析为布尔值的字符串。

Expects a Boolean value such as true or false, or a string that can be parsed into a Boolean value.

默认值:false

Default value: false

此配置属性的变式(点击打开) hibernate.search.backends.<backend-name>.query.shard_failure.ignore

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.query.shard_failure.ignore

hibernate.search.backend.read_timeout

从 Elasticsearch 服务器读取响应时的超时时间。

The timeout when reading responses from an Elasticsearch server.

预期以毫秒为单位的正整数,例如_60000_,或可以解析为此类整数值的字符串。

Expects a positive Integer value in milliseconds, such as 60000, or a String that can be parsed into such Integer value.

默认值:30000

Default value: 30000

此配置属性的变式(点击打开) hibernate.search.backends.<backend-name>.read_timeout

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.read_timeout

hibernate.search.backend.request_timeout

向 Elasticsearch 服务器执行请求时的超时时间。

The timeout when executing a request to an Elasticsearch server.

这包括建立连接、发送请求和读取响应所需的时间。

This includes the time needed to establish a connection, send the request and read the response.

预期以毫秒为单位的正整数,例如 60000,或可以解析为此类整数值的字符串。

Expects a positive Integer value in milliseconds, such as 60000, or a String that can be parsed into such Integer value.

默认为无请求超时。

Defaults to no request timeout.

此配置属性的变式(点击打开) hibernate.search.backends.<backend-name>.request_timeout

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.request_timeout

hibernate.search.backend.schema_management.mapping_file

映射文件的路径,允许在模式管理中由 Hibernate Search 创建的索引使用自定义映射。

The path to a mappings file, allowing custom mappings for indexes created by Hibernate Search as part of schema management.

预期一个字符串来表示类路径中经 UTF-8 编码的文件的路径。该文件必须包含以 JSON 格式表示的索引设置,其确切语法与 Elasticsearch 服务器在 "mappings" 属性 when defining the mapping for an index 下期望的语法完全相同。

Expects a string representing the path to a UTF-8-encoded file in the classpath. The file must contain index settings expressed in JSON format, with the exact same syntax as expected by the Elasticsearch server under the "mappings" property when defining the mapping for an index.

该文件不需要包含完整的映射:Hibernate Search 会自动将缺少的属性(索引字段)注入给定的映射。

The file does not need to contain the full mapping: Hibernate Search will automatically inject missing properties (index fields) in the given mapping.

将如下处理给定映射与 Hibernate Search 生成的映射之间的冲突:

Conflicts between the given mapping and the mapping generated by Hibernate Search will be handled as follows:

映射根处的 _properties_以外的映射参数将是给定映射中的那些参数;Hibernate Search 生成的那些参数将被忽略。

Mapping parameters other than properties at the mapping root will be those from the given mapping; those generated by Hibernate Search will be ignored.

properties_将使用在给定映射和 Hibernate Search 生成的映射中定义的属性进行合并。如果一个属性在两边都定义,则将使用给定映射中的映射参数,除了 _properties,它将使用相同的方式递归合并。

properties will be merged, using properties defined in both the given mapping and the mapping generated by Hibernate Search. If a property is defined on both sides, mapping parameters from the given mapping will be used, except for properties, which will be merged recursively in the same way.

默认为无值,表示将仅使用 Hibernate Search 生成的索引映射。

Defaults to no value, meaning only index mappings generated by Hibernate Search will be used.

此配置属性的变式(点击打开) hibernate.search.backend.indexes.<index-name>.schema_management.mapping_file

Variants of this configuration property (click to open)hibernate.search.backend.indexes.<index-name>.schema_management.mapping_file

hibernate.search.backends.<backend-name>.schema_management.mapping_file

hibernate.search.backends.<backend-name>.schema_management.mapping_file

hibernate.search.backends.<backend-name>.indexes.<index-name>.schema_management.mapping_file

hibernate.search.backends.<backend-name>.indexes.<index-name>.schema_management.mapping_file

hibernate.search.backend.schema_management.minimal_required_status

在 Hibernate Search 可以开始使用某个索引之前,启动时该索引所需的最低状态。

The minimal required status of an index on startup, before Hibernate Search can start using it.

期望一个 IndexStatus 值,或此类值的字符串表示形式。

Expects an IndexStatus value, or a String representation of such value.

在针对支持索引状态检查的 Elasticsearch 分发版本时默认为_yellow_,而在针对不支持索引状态检查的 Elasticsearch 分发版本(如 Amazon OpenSearch Serverless)时默认为无值(无要求)。

Defaults to yellow when targeting an Elasticsearch distribution that supports index status checking, and to no value (no requirement) when targeting an Elasticsearch distribution that does not support index status checking (like Amazon OpenSearch Serverless).

此配置属性的变式(点击打开) hibernate.search.backend.indexes.<index-name>.schema_management.minimal_required_status

Variants of this configuration property (click to open)hibernate.search.backend.indexes.<index-name>.schema_management.minimal_required_status

hibernate.search.backends.<backend-name>.schema_management.minimal_required_status

hibernate.search.backends.<backend-name>.schema_management.minimal_required_status

hibernate.search.backends.<backend-name>.indexes.<index-name>.schema_management.minimal_required_status

hibernate.search.backends.<backend-name>.indexes.<index-name>.schema_management.minimal_required_status

hibernate.search.backend.schema_management.minimal_required_status_wait_timeout

等待时超时 required status

The timeout when waiting for the required status.

预期以毫秒为单位的正整数,例如_60000_,或可以解析为此类整数值的字符串。

Expects a positive Integer value in milliseconds, such as 60000, or a String that can be parsed into such Integer value.

默认值:10000

Default value: 10000

此配置属性的变量(单击以打开) hibernate.search.backend.indexes.<index-name>.schema_management.minimal_required_status_wait_timeout

Variants of this configuration property (click to open)hibernate.search.backend.indexes.<index-name>.schema_management.minimal_required_status_wait_timeout

hibernate.search.backends.<backend-name>.schema_management.minimal_required_status_wait_timeout

hibernate.search.backends.<backend-name>.schema_management.minimal_required_status_wait_timeout

hibernate.search.backends.<backend-name>.indexes.<index-name>.schema_management.minimal_required_status_wait_timeout

hibernate.search.backends.<backend-name>.indexes.<index-name>.schema_management.minimal_required_status_wait_timeout

hibernate.search.backend.schema_management.settings_file

指向设置文件的路径,允许对 Hibernate Search 在模式管理一部分内创建的索引进行自定义设置。

The path to a settings file, allowing custom settings for indexes created by Hibernate Search as part of schema management.

预期一个字符串来表示类路径中经 UTF-8 编码的文件的路径。该文件必须包含以 JSON 格式表示的索引设置,其确切语法与 Elasticsearch 服务器在 "settings" 属性 when creating an index 下期望的语法完全相同。例如,如果文件内容为 {"index.codec": "best_compression"},它将把 index.codec 设置为 best_compression

Expects a string representing the path to a UTF-8-encoded file in the classpath. The file must contain index settings expressed in JSON format, with the exact same syntax as expected by the Elasticsearch server under the "settings" property when creating an index. For example, if the file content is {"index.codec": "best_compression"}, it will set index.codec to best_compression.

请注意,如果一些定义发生冲突,则由 Hibernate Search 生成的设置将被覆盖。例如,如果分析仪“myAnalyzer”是由 ANALYSIS_CONFIGURER 和此设置文件定义的,则设置文件中的定义将优先。如果仅在分析配置器或设置文件中定义,但不在两者中定义,则它将按原样保留。

Note that the settings generated by Hibernate Search will be overridden in case of conflict of some definitions. For instance, if an analyzer "myAnalyzer" is defined by the ANALYSIS_CONFIGURER and this settings file, the definition from the settings file will take precedence. If it is only defined in either the analysis configurer or the settings file, but not both, it will be preserved as-is.

默认为无值,意味着仅使用 Hibernate Search 生成的索引设置。

Defaults to no value, meaning only index settings generated by Hibernate Search will be used.

此配置属性的变量(单击以打开) hibernate.search.backend.indexes.<index-name>.schema_management.settings_file

Variants of this configuration property (click to open)hibernate.search.backend.indexes.<index-name>.schema_management.settings_file

hibernate.search.backends.<backend-name>.schema_management.settings_file

hibernate.search.backends.<backend-name>.schema_management.settings_file

hibernate.search.backends.<backend-name>.indexes.<index-name>.schema_management.settings_file

hibernate.search.backends.<backend-name>.indexes.<index-name>.schema_management.settings_file

hibernate.search.backend.scroll_timeout

用于指定如果 Elasticsearch 没有获取到其他结果, scroll 将可使用的最大持续时间。

Property for specifying the maximum duration a scroll will be usable if no other results are fetched from Elasticsearch.

预期以秒为单位的正整数,如 60,或可解析成该整数的字符串。

Expects a positive Integer value in seconds, such as 60, or a String that can be parsed into such Integer value.

默认值: 60

Default value: 60

此配置属性(点击展开) hibernate.search.backends.<backend-name>.scroll_timeout 的变体

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.scroll_timeout

hibernate.search.backend.thread_pool.size

分配给后端的线程池的大小。

The size of the thread pool assigned to the backend.

预期一个严格正整数值或一个可解析为整数的字符串。

Expects a strictly positive integer value, or a string that can be parsed into an integer value.

有关此设置及其含义的更多信息,请参阅参考文档“Elasticsearch 后端 - 线程”部分。

See the reference documentation, section "Elasticsearch backend - Threads", for more information about this setting and its implications.

默认为 JVM 启动时可用的处理器内核数量。

Defaults to the number of processor cores available to the JVM on startup.

此配置属性的变体(点击以打开) hibernate.search.backends.<backend-name>.thread_pool.size

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.thread_pool.size

hibernate.search.backend.uris

连接到的 Elasticsearch 服务器的协议、主机名和端口。

The protocol, hostname and ports of the Elasticsearch servers to connect to.

或者期望一个表示 URI 的字符串,例如 _ http://localhost_ 或 _ https://es.mycompany.com:4400_ ,或者一个包含多个由逗号分隔的此类 URI 的字符串,或者为一个包含此类 URI 的 Collection<String>

Expects either a String representing an URI such as http://localhost or https://es.mycompany.com:4400, or a String containing multiple such URIs separated by commas, or a Collection<String> containing such URIs.

所有 URI 必须指定同个协议。

All the URIs must specify the same protocol.

同时设置此属性和 HOSTSPROTOCOL 会导致在启动时抛出异常。

Setting this property at the same time as HOSTS or PROTOCOL will lead to an exception being thrown on startup.

默认为 _ http://localhost:9200_ ,除非设置了 HOSTSPROTOCOL ,在这种情况下,它们具有优先权。

Defaults to http://localhost:9200, unless HOSTS or PROTOCOL are set, in which case they take precedence.

本配置属性的变体(点击打开) hibernate.search.backends.<backend-name>.uris

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.uris

hibernate.search.backend.username

连接到 Elasticsearch 服务器(HTTP 认证)时发送的用户名。

The username to send when connecting to the Elasticsearch servers (HTTP authentication).

预期值为字符串。

Expects a String.

默认情况下不使用用户名(匿名访问)。

Defaults to no username (anonymous access).

本配置属性的变体(点击打开) hibernate.search.backends.<backend-name>.username

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.username

hibernate.search.backend.version

Elasticsearch 集群中正在运行的 Elasticsearch 版本。

The version of Elasticsearch running on the Elasticsearch cluster.

预期一个 ElasticsearchVersion 对象,或一个可在该对象中 parsed 的字符串。

Expects either an ElasticsearchVersion object, or a String that can be parsed in such an object.

无默认值:未提供时,系统将在启动时向 Elasticsearch 集群发送请求来自动解析版本。

No default: if not provided, the version will be resolved automatically by sending a request to the Elasticsearch cluster on startup.

本配置属性的变体(点击打开) hibernate.search.backends.<backend-name>.version

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.version

hibernate.search.backend.version_check.enabled

是否启用 Elasticsearch 集群的版本检查。

Whether check version of the Elasticsearch cluster is enabled.

需要布尔值,例如 truefalse,或可解析为布尔值的字符串。

Expects a Boolean value such as true or false, or a string that can be parsed into a Boolean value.

VERSION 未配置或设置为支持版本检查的发行版时,默认值为 true ;当 VERSION 设置为不支持版本检查的发行版(如 Amazon OpenSearch Serverless)时,默认值为 false

Defaults to true when the VERSION is unconfigured or set to a distribution that supports version checking, and to false when the VERSION is set to a distribution that does not support version checking (like Amazon OpenSearch Serverless).

默认值: true

Default value: true

本配置属性的变体(点击打开) hibernate.search.backends.<backend-name>.version_check.enabled

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.version_check.enabled

A.4. Hibernate Search Backend - Elasticsearch - AWS integration

hibernate.search.backend.aws.credentials.access_key_id

在使用 static credentials 时的 AWS 访问密钥 ID。

The AWS access key ID when using static credentials.

预期字符串值,例如 AKIDEXAMPLE

Expects a String value such as AKIDEXAMPLE.

无默认值:在启用签名且证书类型设置为 ElasticsearchAwsCredentialsTypeNames.STATIC 时必须提供。

No default: must be provided when signing is enabled and the credentials type is set to ElasticsearchAwsCredentialsTypeNames.STATIC.

本配置属性的变体(点击打开) hibernate.search.backends.<backend-name>.aws.credentials.access_key_id

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.aws.credentials.access_key_id

hibernate.search.backend.aws.credentials.secret_access_key

在使用 static credentials 时的 AWS 密钥访问密钥。

The AWS secret access key when using static credentials.

预期字符串值,例如 wJalrXUtnFEMI/K7MDENG+bPxRfiCYEXAMPLEKEY

Expects a String value such as wJalrXUtnFEMI/K7MDENG+bPxRfiCYEXAMPLEKEY

无默认值:在启用签名且证书类型设置为 ElasticsearchAwsCredentialsTypeNames.STATIC 时必须提供。

No default: must be provided when signing is enabled and the credentials type is set to ElasticsearchAwsCredentialsTypeNames.STATIC.

本配置属性的变体(点击打开) hibernate.search.backends.<backend-name>.aws.credentials.secret_access_key

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.aws.credentials.secret_access_key

hibernate.search.backend.aws.credentials.type

enabled 签名时使用的证书类型。

The type of credentials to use when signing is enabled.

期望在 ElasticsearchAwsCredentialsTypeNames 中列为常量的其中一个名称。

Expects one of the names listed as constants in ElasticsearchAwsCredentialsTypeNames.

默认值: "default"

Default value: "default"

本配置属性的变体(点击打开) hibernate.search.backends.<backend-name>.aws.credentials.type

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.aws.credentials.type

hibernate.search.backend.aws.region

AWS 区域。

The AWS region.

需要 us-east-1 这样的字符串值。

Expects a String value such as us-east-1.

当启用签名时没有默认值:必需提供。

No default: must be provided when signing is enabled.

此配置属性的变体 (点击以打开) hibernate.search.backends.<backend-name>.aws.region

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.aws.region

hibernate.search.backend.aws.signing.enabled

是否应使用 AWS 凭证对请求进行签名。

Whether requests should be signed using the AWS credentials.

需要布尔值,例如 truefalse,或可解析为布尔值的字符串。

Expects a Boolean value such as true or false, or a string that can be parsed into a Boolean value.

默认值:false

Default value: false

此配置属性的变体 (点击以打开) hibernate.search.backends.<backend-name>.aws.signing.enabled

Variants of this configuration property (click to open)hibernate.search.backends.<backend-name>.aws.signing.enabled

A.5. Hibernate Search ORM Integration

hibernate.search.automatic_indexing.enable_dirty_check

已弃用。

Deprecated.

将在未来版本中删除此设置。不会提供任何替代品来替换它。在未来版本中删除此属性后,在考虑是否触发重新索引时,将始终执行脏检查。

This setting will be removed in a future version. There will be no alternative provided to replace it. After the removal of this property in a future version, a dirty check will always be performed when considering whether to trigger reindexing.

是否在实际重新索引实体之前检查脏属性是否与索引相关。

Whether to check if dirty properties are relevant to indexing before actually reindexing an entity.

启用时,如果仅对索引时不使用的属性进行更改,将跳过实体的重新索引。此功能被认为是安全的,因此默认启用。

When enabled, re-indexing of an entity is skipped if the only changes are on properties that are not used when indexing. This feature is considered safe and thus enabled by default.

需要布尔值,例如 truefalse,或可解析为布尔值的字符串。

Expects a Boolean value such as true or false, or a string that can be parsed into a Boolean value.

默认值: true

Default value: true

hibernate.search.automatic_indexing.enabled

已弃用。

Deprecated.

是否启用了监听器触发的索引,即是否自动检测 Hibernate ORM 会话中实体的更改并导致重新索引。

Whether listener-triggered indexing is enabled, i.e. whether changes to entities in a Hibernate ORM session are detected automatically and lead to reindexing.

需要布尔值,例如 truefalse,或可解析为布尔值的字符串。

Expects a Boolean value such as true or false, or a string that can be parsed into a Boolean value.

默认值: true

Default value: true

hibernate.search.automatic_indexing.strategy

已弃用。

Deprecated.

请改用 INDEXING_LISTENERS_ENABLED (注意:它需要一个布尔值)。

Use INDEXING_LISTENERS_ENABLED instead (caution: it expects a boolean value).

如何启用或禁用监听器触发的索引。

How to enable or disable listener-triggered indexing.

需要一个 AutomaticIndexingStrategyName 值,或此类值的字符串表示形式。

Expects a AutomaticIndexingStrategyName value, or a String representation of such value.

hibernate.search.automatic_indexing.synchronization.strategy

已弃用。

Deprecated.

如何在应用程序线程和由 SearchIndexingPlan 触发的索引之间进行同步。

How to synchronize between application threads and indexing triggered by the SearchIndexingPlan.

需要使用 AutomaticIndexingSynchronizationStrategyNames 中定义的某个字符串,或对类型为 AutomaticIndexingSynchronizationStrategy 的 bean 的引用。

Expects one of the strings defined in AutomaticIndexingSynchronizationStrategyNames, or a reference to a bean of type AutomaticIndexingSynchronizationStrategy.

hibernate.search.coordination.strategy

如何在分布式应用程序的节点之间进行协调。

How to coordinate between nodes of a distributed application.

需要对协调策略的引用;请参阅参考文档了解可用的策略和相关 Maven 依赖关系。

Expects a reference to a coordination strategy; see the reference documentation for available strategies and the relevant Maven dependencies.

hibernate.search.enabled

是否启用或禁用 Hibernate Search。

Whether Hibernate Search is enabled or disabled.

需要布尔值,例如 truefalse,或可解析为布尔值的字符串。

Expects a Boolean value such as true or false, or a string that can be parsed into a Boolean value.

默认值: true

Default value: true

hibernate.search.indexing.listeners.enabled

是否启用侦测实体更改并自动触发索引操作的 Hibernate ORM 侦听器。

Whether Hibernate ORM listeners that detect entity changes and automatically trigger indexing operations are enabled.

需要布尔值,例如 truefalse,或可解析为布尔值的字符串。

Expects a Boolean value such as true or false, or a string that can be parsed into a Boolean value.

默认值: true

Default value: true

hibernate.search.indexing.mass.default_clean_operation

在非明确配置期间应用于批量索引的默认索引清理操作。

The default index cleaning operation to apply during mass indexing, unless configured explicitly.

需要 MassIndexingDefaultCleanOperation 值或此类值的字符串表示形式。

Expects a MassIndexingDefaultCleanOperation value, or a String representation of such value.

hibernate.search.indexing.plan.synchronization.strategy

如何在应用程序线程和由 SearchIndexingPlan 触发的索引之间进行同步。

How to synchronize between application threads and indexing triggered by the SearchIndexingPlan.

需要 IndexingPlanSynchronizationStrategyNames 中定义的其中一个字符串或 IndexingPlanSynchronizationStrategy 类型的 bean 引用。

Expects one of the strings defined in IndexingPlanSynchronizationStrategyNames, or a reference to a bean of type IndexingPlanSynchronizationStrategy.

hibernate.search.mapping.build_missing_discovered_jandex_indexes

annotation processing is enabled (默认值)时,无论 Hibernate Search 是否应为在注释处理过程中已注册的类型(尤其是实体)自动构建 Jandex 索引,以确保考虑那些 JAR 中的所有“根映射”注释(如 ProjectionConstructor )。

When annotation processing is enabled (the default), whether Hibernate Search should automatically build Jandex indexes for types registered for annotation processing (entities in particular), to ensure that all "root mapping" annotations in those JARs (e.g. ProjectionConstructor) are taken into account.

需要布尔值,例如 truefalse,或可解析为布尔值的字符串。

Expects a Boolean value such as true or false, or a string that can be parsed into a Boolean value.

默认值: true

Default value: true

hibernate.search.mapping.configurer

Hibernate Search 映射的配置器。

A configurer for the Hibernate Search mapping.

需要对 HibernateOrmSearchMappingConfigurer 类型进行单个值或多值引用。

Expects a single-valued or multi-valued reference to beans of type HibernateOrmSearchMappingConfigurer.

默认为无值。

Defaults to no value.

hibernate.search.mapping.discover_annotated_types_from_root_mapping_annotations

annotation processing is enabled (默认值)时,无论 Hibernate Search 是否应自动发现存在于 Jandex 索引中,并且同时注释有 root mapping annotations 的注释类型。

When annotation processing is enabled (the default), whether Hibernate Search should automatically discover annotated types present in the Jandex index that are also annotated with root mapping annotations.

当启用时,如果在 Jandex 索引中发现带有 RootMapping 元注解的注解,并且在 Jandex 索引中发现具有该注解(例如 SearchEntityProjectionConstructor)的类型,那么即使该类型没有显式添加,该类型也会自动被扫描以查找映射注解。

When enabled, if an annotation meta-annotated with RootMapping is found in the Jandex index, and a type annotated with that annotation (e.g. SearchEntity or ProjectionConstructor) is found in the Jandex index, then that type will automatically be scanned for mapping annotations, even if the type wasn’t explicitly added.

需要布尔值,例如 truefalse,或可解析为布尔值的字符串。

Expects a Boolean value such as true or false, or a string that can be parsed into a Boolean value.

默认值: true

Default value: true

hibernate.search.mapping.process_annotations

是否应自动处理实体类型及其嵌套类型(如 index-embedded 类型)的注释。

Whether annotations should be automatically processed for entity types, as well as nested types in those entity types, for instance index-embedded types.

需要布尔值,例如 truefalse,或可解析为布尔值的字符串。

Expects a Boolean value such as true or false, or a string that can be parsed into a Boolean value.

默认值: true

Default value: true

hibernate.search.multi_tenancy.tenant_identifier_converter

如何将租户标识符转换成字符串表示,或者从该表示转换成租户标识符。

How to convert tenant identifier to and form the string representation.

将租户标识符转换为字符串表示以写入索引,并在必须打开新的 Hibernate ORM 会话时从字符串转换为其对象表示。

Converts a tenant identifier to a string representation to be written to the index, and converts to its object representation from a string when a new Hibernate ORM session must be opened.

当启用多租户时,并且如果非字符串租户标识符被用作通过此属性提供的自定义转换器。

When multi-tenancy is enabled, and non-string tenant identifiers are used a custom converter must be provided through this property.

默认值为 HibernateOrmMapperSettings.Defaults.MULTI_TENANCY_TENANT_IDENTIFIER_CONVERTER 。此转换器只支持字符串租户标识符,而且如果其他类型的标识符被使用的话,它将会失败。

Defaults to HibernateOrmMapperSettings.Defaults.MULTI_TENANCY_TENANT_IDENTIFIER_CONVERTER. This converter only supports string tenant identifiers and will fail if some other type of identifiers is used.

hibernate.search.multi_tenancy.tenant_ids

当启用多租户时,所有可以被应用程序使用的租户标识符的完备列表。

An exhaustive list of all tenant identifiers that can be used by the application when multi-tenancy is enabled.

期望一个由逗号分隔表示多个租户 ID 的字符串或包含租户 ID 的 Collection<String>

Expects either a String representing multiple tenant IDs separated by commas, or a Collection<String> containing tenant IDs.

没有默认值;此属性可能不得不对 coordination strategy 进行明确设置。

No default; this property may have to be set explicitly depending on the coordination strategy.

hibernate.search.query.loading.cache_lookup.strategy

在加载实体以进行搜索查询时,如何查找二级缓存中的实体。

How to look up entities in the second-level cache when loading entities for a search query.

期望一个 EntityLoadingCacheLookupStrategy 值,或这样的值的字符串表示。

Expects a EntityLoadingCacheLookupStrategy value, or a String representation of such value.

hibernate.search.query.loading.fetch_size

在加载实体以进行搜索查询时,每个数据库查询应加载多少个实体。

How many entities to load per database query when loading entities for a search query.

期望一个严格为正的 Integer 值,例如 100,或可以解析为此类 Integer 值的字符串。

Expects a strictly positive Integer value, such as 100, or a String that can be parsed into such Integer value.

默认值:100

Default value: 100

hibernate.search.schema_management.strategy

在启动和关闭时如何创建、更新、验证或删除索引及其模式。

How indexes and their schema are created, updated, validated or dropped on startup and shutdown.

期望一个 SchemaManagementStrategyName 值,或这样的值的字符串表示。

Expects a SchemaManagementStrategyName value, or a String representation of such value.

A.6. Hibernate Search ORM Integration - Coordination - Outbox Polling

hibernate.search.coordination.entity.mapping.agent.catalog

用于代理表数据库目录。

The database catalog to use for the agent table.

仅在 "hibernate.search.coordination.strategy" 是 "outbox-polling" 时可用。

Only available when "hibernate.search.coordination.strategy" is "outbox-polling".

默认为 Hibernate ORM 中配置的默认目录。请参阅 MappingSettings.DEFAULT_CATALOG

Defaults to the default catalog configured in Hibernate ORM. See MappingSettings.DEFAULT_CATALOG.

hibernate.search.coordination.entity.mapping.agent.schema

用于代理表数据库模式。

The database schema to use for the agent table.

仅在 "hibernate.search.coordination.strategy" 是 "outbox-polling" 时可用。

Only available when "hibernate.search.coordination.strategy" is "outbox-polling".

默认为 Hibernate ORM 中配置的默认模式。请参阅 MappingSettings.DEFAULT_SCHEMA

Defaults to the default schema configured in Hibernate ORM. See MappingSettings.DEFAULT_SCHEMA.

hibernate.search.coordination.entity.mapping.agent.table

代理表名称。

The name of the agent table.

仅在 "hibernate.search.coordination.strategy" 是 "outbox-polling" 时可用。

Only available when "hibernate.search.coordination.strategy" is "outbox-polling".

此值的默认值为 "HSEARCH_AGENT"

The default for this value is "HSEARCH_AGENT".

默认值:"HSEARCH_AGENT"

Default value: "HSEARCH_AGENT"

hibernate.search.coordination.entity.mapping.agent.uuid_gen_strategy

UuidGenerator 为代理表使用的 UUID 生成器策略的名称。

The name of UUID generator strategy to be used by UuidGenerator for the agent table.

仅在 "hibernate.search.coordination.strategy" 是 "outbox-polling" 时可用。

Only available when "hibernate.search.coordination.strategy" is "outbox-polling".

hibernate.search.coordination.entity.mapping.agent.uuid_type

用于在代理表中表示 UUID 的 Hibernate ORM constant type code used to identify a generic SQL type 的名称。

The name of the Hibernate ORM constant type code used to identify a generic SQL type used for representing an UUID in the agent table.

仅在 "hibernate.search.coordination.strategy" 是 "outbox-polling" 时可用。

Only available when "hibernate.search.coordination.strategy" is "outbox-polling".

默认值: "default"

Default value: "default"

hibernate.search.coordination.entity.mapping.outboxevent.catalog

用于出站事件表的数据库目录。

The database catalog to use for the outbox event table.

仅在 "hibernate.search.coordination.strategy" 是 "outbox-polling" 时可用。

Only available when "hibernate.search.coordination.strategy" is "outbox-polling".

默认为 Hibernate ORM 中配置的默认目录。请参阅 MappingSettings.DEFAULT_CATALOG

Defaults to the default catalog configured in Hibernate ORM. See MappingSettings.DEFAULT_CATALOG.

hibernate.search.coordination.entity.mapping.outboxevent.schema

用于出站事件表的数据库模式。

The database schema to use for the outbox event table.

仅在 "hibernate.search.coordination.strategy" 是 "outbox-polling" 时可用。

Only available when "hibernate.search.coordination.strategy" is "outbox-polling".

默认为 Hibernate ORM 中配置的默认模式。请参阅 MappingSettings.DEFAULT_SCHEMA

Defaults to the default schema configured in Hibernate ORM. See MappingSettings.DEFAULT_SCHEMA.

hibernate.search.coordination.entity.mapping.outboxevent.table

outbox 事件表的名称。

The name of the outbox event table.

仅在 "hibernate.search.coordination.strategy" 是 "outbox-polling" 时可用。

Only available when "hibernate.search.coordination.strategy" is "outbox-polling".

此值的默认值为 "HSEARCH_OUTBOX_EVENT"

The default for this value is "HSEARCH_OUTBOX_EVENT".

hibernate.search.coordination.entity.mapping.outboxevent.uuid_gen_strategy

UuidGenerator 在 outbox 事件表中使用的 UUID 生成器策略的名称。

The name of UUID generator strategy to be used by UuidGenerator for the outbox event table.

仅在 "hibernate.search.coordination.strategy" 是 "outbox-polling" 时可用。

Only available when "hibernate.search.coordination.strategy" is "outbox-polling".

hibernate.search.coordination.entity.mapping.outboxevent.uuid_type

Hibernate ORM constant type code used to identify a generic SQL type 的名称,用于在 outbox 事件表中表示 UUID。

The name of the Hibernate ORM constant type code used to identify a generic SQL type used for representing an UUID in the outbox event table.

仅在 "hibernate.search.coordination.strategy" 是 "outbox-polling" 时可用。

Only available when "hibernate.search.coordination.strategy" is "outbox-polling".

hibernate.search.coordination.event_processor.batch_size

在事件处理器中,一次事务中最多处理多少个 outbox 事件。

In the event processor, how many outbox events, at most, are processed in a single transaction.

仅在 "hibernate.search.coordination.strategy" 是 "outbox-polling" 时可用。

Only available when "hibernate.search.coordination.strategy" is "outbox-polling".

期待一个正整数,如 50,或可以解析成该整数的字符串。

Expects a positive Integer value, such as 50, or a String that can be parsed into such Integer value.

默认值:50

Default value: 50

hibernate.search.coordination.event_processor.enabled

应用程序是否将处理实体更改事件。

Whether the application will process entity change events.

仅在 "hibernate.search.coordination.strategy" 是 "outbox-polling" 时可用。

Only available when "hibernate.search.coordination.strategy" is "outbox-polling".

需要布尔值,例如 truefalse,或可解析为布尔值的字符串。

Expects a Boolean value such as true or false, or a string that can be parsed into a Boolean value.

当事件处理器被禁用时,当实体更改时,此应用程序节点仍会生成事件,但不会在此应用程序节点上进行索引,并假定在另一个节点上进行。

When the event processor is disabled, events will still be produced by this application node whenever an entity changes, but indexing will not happen on this application node and is assumed to happen on another node.

默认值: true

Default value: true

hibernate.search.coordination.event_processor.order

在事件处理器中,处理 outbox 事件的顺序。

In the event processor, the order in which outbox events are processed.

仅在 "hibernate.search.coordination.strategy" 是 "outbox-polling" 时可用。

Only available when "hibernate.search.coordination.strategy" is "outbox-polling".

使用在 OutboxEventProcessingOrder 中定义的“外部表示”字符串之一。

Expects one of the "external representation" strings defined in OutboxEventProcessingOrder.

hibernate.search.coordination.event_processor.polling_interval

在事件处理器中,在查询未返回任何事件后,等待再次查询 outbox 事件表的时间(以毫秒为单位)。

In the event processor, how long to wait for another query to the outbox events table after a query didn’t return any event, in milliseconds.

仅在 "hibernate.search.coordination.strategy" 是 "outbox-polling" 时可用。

Only available when "hibernate.search.coordination.strategy" is "outbox-polling".

如果上次轮询未返回任何事件,Hibernate Search 将等待很长时间后再重新轮询:

Hibernate Search will wait that long before polling again if the last polling didn’t return any event:

值越高,实体更改与索引中对应的更新之间的延迟越大,但当没有要处理的事件时,对数据库的压力越小。

High values mean higher latency between an entity change and the corresponding update in the index, but less stress on the database when there are no events to process.

较小值表示实体更改和索引中的相应更新之间的延迟较低,但当没有事件需要处理时,数据库压力较大。

Low values mean lower latency between an entity change and the corresponding update in the index, but more stress on the database when there are no events to process.

期望以毫秒为单位的正整数,例如 1000,或可以解析为该整数的字符串。

Expects a positive Integer value in milliseconds, such as 1000, or a String that can be parsed into such Integer value.

默认值:100

Default value: 100

hibernate.search.coordination.event_processor.pulse_expiration

在将代理视为断开连接并强制将其从集群中移除之前,事件处理器“脉冲”保持有效的时间(以毫秒为单位)。

How long, in milliseconds, an event processor "pulse" remains valid before considering the agent disconnected and forcibly removing it from the cluster.

仅在 "hibernate.search.coordination.strategy" 是 "outbox-polling" 时可用。

Only available when "hibernate.search.coordination.strategy" is "outbox-polling".

每个代理都将在数据库表中注册自身。通常,在轮询处理事件时,批量索引代理将执行 "pulse" :它将暂停当前操作,然后(除其他操作外)更新表中的条目,让其他代理知道它仍然处于活动状态并防止过期。如果代理在其条目未更新的时间超过过期时间间隔的值,则将被视为已断开连接:其他代理将强制从表中移除其条目,并根据需要执行重新平衡(重新分配分片)。

Every agent registers itself in a database table. Regularly, while polling for events to process, mass indexer agent performs a "pulse": it pauses what it was doing and (among other things) updates its entry in the table, to let other agents know it’s still alive and prevent an expiration. If an agent fails to update its entry for longer than the value of the expiration interval, it will be considered disconnected: other agents will forcibly remove its entry from the table, and will perform rebalancing (reassign shards) as necessary.

过期时间间隔必须设置为至少比 pulse interval 大 3 倍的值:

The expiration interval must be set to a value at least 3 times larger than the pulse interval:

较小值(更接近脉冲间隔)表示节点因崩溃或网络故障而突然离开集群时,不处理事件而浪费的时间更少,但由于事件处理器被错误地认为已断开连接而不处理事件而浪费时间的风险增加。

Low values (closer to the pulse interval) mean less time wasted not processing events when a node abruptly leaves the cluster due to a crash or network failure, but increased risk of wasting time not processing events because an event processor is incorrectly considered disconnected.

较大值(远大于脉冲间隔)表示节点因崩溃或网络故障而突然离开集群时,不处理事件而浪费的时间更多,但由于事件处理器被错误地认为已断开连接而不处理事件而浪费时间风险降低。

High values (much larger than the pulse interval) mean more time wasted not processing events when a node abruptly leaves the cluster due to a crash or network failure, but reduced risk of wasting time not processing events because an event processor is incorrectly considered disconnected.

期待一个毫秒的正整数,如 30000,或可以解析成该整数的字符串。

Expects a positive Integer value in milliseconds, such as 30000, or a String that can be parsed into such Integer value.

默认值:30000

Default value: 30000

hibernate.search.coordination.event_processor.pulse_interval

在必须执行“脉冲”之前,事件处理器可以轮询时间的长度(以毫秒为单位)。

How long, in milliseconds, the event processor can poll for events before it must perform a "pulse".

仅在 "hibernate.search.coordination.strategy" 是 "outbox-polling" 时可用。

Only available when "hibernate.search.coordination.strategy" is "outbox-polling".

每个代理都在数据库表中注册自身。通常,在轮询要处理的事件时,事件处理器会执行一个“pulse”:它暂停索引并:

Every agent registers itself in a database table. Regularly, while polling for events to process, the event processor performs a "pulse": it pauses indexing and:

它更新它在表中的条目,以让其他代理知道它仍处于活动状态并防止过期。

It updates its own entry in the table, to let other agents know it’s still alive and prevent an expiration

它会从表中删除所有其他已过期的代理。

It removes any other agents that expired from the table

如果注意到正在运行批量索引器,则会挂起自身。

It suspends itself if it notices a mass indexer is running

如果参与后台索引的代理数量在最近一次脉冲后发生更改,则执行重新平衡(重新分配分片)。

It performs rebalancing (reassignment of shards) if the number of agents participating in background indexing changed since the last pulse

心跳间隔必须设置为介于 polling intervalexpiration interval 三分之一 (1/3) 之间的值:

The pulse interval must be set to a value between the polling interval and one third (1/3) of the expiration interval:

较小值(更接近轮询间隔)表示节点加入或离开集群时,不处理事件而浪费的时间更少,降低了由于事件处理器被错误地认为已断开连接而不处理事件而浪费时间的风险,但由于更频繁地检查代理列表,加大了数据库压力。

Low values (closer to the polling interval) mean less time wasted not processing events when a node joins or leaves the cluster, and reduced risk of wasting time not processing events because an event processor is incorrectly considered disconnected, but more stress on the database because of more frequent checks of the list of agents.

较大值(更接近过期间隔)表示节点加入或离开集群时,不处理事件而浪费的时间更多,并且因事件处理器被错误地认为已断开连接而不处理事件而浪费时间风险增加,但由于不太频繁地检查代理列表,减轻了数据库压力。

High values (closer to the expiration interval) mean more time wasted not processing events when a node joins or leaves the cluster, and increased risk of wasting time not processing events because an event processor is incorrectly considered disconnected, but less stress on the database because of less frequent checks of the list of agents.

期望以毫秒为单位的正整数,例如 2000,或可以解析为该整数的字符串。

Expects a positive Integer value in milliseconds, such as 2000, or a String that can be parsed into such Integer value.

默认值:2000

Default value: 2000

hibernate.search.coordination.event_processor.retry_delay

事件处理器在处理失败后重新处理事件前必须等待多长时间。

How long the event processor must wait before re-processing an event after its processing failed.

仅在 "hibernate.search.coordination.strategy" 是 "outbox-polling" 时可用。

Only available when "hibernate.search.coordination.strategy" is "outbox-polling".

期望以秒为单位的正整数,例如 10,或可以解析为该整数的字符串。

Expects a positive integer value in seconds, such as 10, or a String that can be parsed into such Integer value.

使用值 0 尽快重新处理失败的事件,无延迟。

Use the value 0 to reprocess the failed events as soon as possible, with no delay.

默认值:30

Default value: 30

hibernate.search.coordination.event_processor.shards.assigned

分配给此应用程序节点的用于事件处理的分片索引。

The indices of shards assigned to this application node for event processing.

必须将分片唯一分配给一个且仅一个应用程序节点。如果不这样做,则某些事件可能不会被处理,或者可能被处理两次或按错误顺序处理,从而导致错误和/或索引不同步。

shards must be uniquely assigned to one and only one application nodes. Failing that, some events may not be processed or may be processed twice or in the wrong order, resulting in errors and/or out-of-sync indexes.

仅在 "hibernate.search.coordination.strategy" 是 "outbox-polling" 时可用。

Only available when "hibernate.search.coordination.strategy" is "outbox-polling".

When this property is set, "hibernate.search.coordination.event_processor.shards.total_count" must also be set.

预计分片索引,即介于 0 (包括)和 total shard count (不包括)之间的整数值,或可解析为此类分片索引的字符串,或包含多个此类分片索引字符串(用逗号分隔),或包含此类分片索引的 Collection<Integer>

Expects a shard index, i.e. an Integer value between 0 (inclusive) and the total shard count (exclusive), or a String that can be parsed into such shard index, or a String containing multiple such shard index strings separated by commas, or a Collection<Integer> containing such shard indices.

无默认值:如果您想要静态分片,则必须显式提供。

No default: must be provided explicitly if you want static sharding.

hibernate.search.coordination.event_processor.shards.total_count

用于事件处理的所有应用程序节点上的分片总数。

The total number of shards across all application nodes for event processing.

此属性对于所有应用程序节点必须具有相同的值,并且除非停止并重新启动所有应用程序节点,否则绝不能更改。如果不这样做,则某些事件可能不会被处理,或者可能被处理两次或按错误顺序处理,从而导致错误和/或索引不同步。

This property must have the same value for all application nodes, and must never change unless all application nodes are stopped, then restarted. Failing that, some events may not be processed or may be processed twice or in the wrong order, resulting in errors and/or out-of-sync indexes.

仅在 "hibernate.search.coordination.strategy" 是 "outbox-polling" 时可用。

Only available when "hibernate.search.coordination.strategy" is "outbox-polling".

设置此属性时,还必须设置 "hibernate.search.coordination.event_processor.shards.assigned"

When this property is set, "hibernate.search.coordination.event_processor.shards.assigned" must also be set.

期望至少为 2 的整数,或可以解析为该整数的字符串。

Expects an Integer value of at least 2, or a String that can be parsed into such Integer value.

无默认值:如果您想要静态分片,则必须显式提供。

No default: must be provided explicitly if you want static sharding.

hibernate.search.coordination.event_processor.transaction_timeout

在事件处理器中,用于处理出站事件的事务的超时时间。

In the event processor, the timeout for transactions processing outbox events.

仅在 "hibernate.search.coordination.strategy" 是 "outbox-polling" 时可用。

Only available when "hibernate.search.coordination.strategy" is "outbox-polling".

仅在配置 JTA 事务管理器时有效。

Only effective when a JTA transaction manager is configured.

期望以秒为单位的正整数,例如 10,或可以解析为该整数的字符串。

Expects a positive Integer value in seconds, such as 10, or a String that can be parsed into such Integer value.

使用 JTA 但未设置此属性时,Hibernate Search 将使用 JTA 事务管理器中配置的任何默认事务超时。

When using JTA and this property is not set, Hibernate Search will use whatever default transaction timeout is configured in the JTA transaction manager.

hibernate.search.coordination.mass_indexer.polling_interval

在批量索引器中,以毫秒为单位,在主动等待事件处理器挂起时等待对代理表进行另一个查询的时间。

In the mass indexer, how long to wait for another query to the agent table when actively waiting for event processors to suspend themselves, in milliseconds.

仅在 "hibernate.search.coordination.strategy" 是 "outbox-polling" 时可用。

Only available when "hibernate.search.coordination.strategy" is "outbox-polling".

Hibernate Search 在发现其他代理尚未挂起时,将等待这么长时间然后再轮询:

Hibernate Search will wait that long before polling again when it finds other agents haven’t suspended yet:

较低的值会缩短批量索引器中介检测到事件处理器最终自行暂停所需的时间,但在批量索引器中介处于活动等待状态时会增加数据库上的压力。

Low values will reduce the time it takes for the mass indexer agent to detect that event processors finally suspended themselves, but will increase the stress on the database while the mass indexer agent is actively waiting.

较高的值会增加批量索引器中介检测到事件处理器最终自行暂停所需的时间,但在批量索引器中介处于活动等待状态时会减小数据库上的压力。

High values will increase the time it takes for the mass indexer agent to detect that event processors finally suspended themselves, but will reduce the stress on the database while the mass indexer agent is actively waiting.

期望以毫秒为单位的正整数,例如 1000,或可以解析为该整数的字符串。

Expects a positive Integer value in milliseconds, such as 1000, or a String that can be parsed into such Integer value.

默认值:100

Default value: 100

hibernate.search.coordination.mass_indexer.pulse_expiration

以毫秒为单位,批量索引器代理“心跳”在被视为代理已断开连接并从集群中强制移除之前保持有效的时长。

How long, in milliseconds, a mass indexer agent "pulse" remains valid before considering the agent disconnected and forcibly removing it from the cluster.

仅在 "hibernate.search.coordination.strategy" 是 "outbox-polling" 时可用。

Only available when "hibernate.search.coordination.strategy" is "outbox-polling".

每个代理都会在数据库表中注册自身。通常,在轮询以处理事件时,每个代理都会执行一次 "pulse" :它会暂停正在执行的操作,并(除其他事项外)更新其在表中的条目,以告知其他代理它仍然处于活动状态并防止过期。如果代理在其条目更新时间超过过期间隔值后未能更新其条目,则该代理将被视为已断开连接:其他代理将强制从表中删除其条目,并将继续其工作,就好像过期的代理不存在一样。

Every agent registers itself in a database table. Regularly, while polling for events to process, each agent performs a "pulse": it pauses what it was doing and (among other things) updates its entry in the table, to let other agents know it’s still alive and prevent an expiration. If an agent fails to update its entry for longer than the value of the expiration interval, it will be considered disconnected: other agents will forcibly remove its entry from the table, and will resume their work as if the expired agent didn’t exist.

过期间隔必须设置为至少比 pulse interval 大 3 倍的值:

The expiration interval must be set to a value at least 3 times larger than the pulse interval:

较低的值(接近脉冲间隔)意味着当批量索引器中介由于崩溃而终止时,事件处理器不会处理事件所浪费的时间更少,但批量索引器中介错误地被认为已断开连接,因此事件处理器在批量索引期间重新开始处理事件的风险增加。

Low values (closer to the pulse interval) mean less time wasted with event processors not processing events when a mass indexer agent terminates due to a crash, but increased risk of event processors starting to process events again during mass indexing because a mass indexer agent is incorrectly considered disconnected.

较高的值(远大于脉冲间隔)意味着当批量索引器中介由于崩溃而终止时,事件处理器不会处理事件所浪费的时间更多,但批量索引器中介错误地被认为已断开连接,因此事件处理器在批量索引期间重新开始处理事件的风险降低。

High values (much larger than the pulse interval) mean more time wasted with event processors not processing events when a mass indexer agent terminates due to a crash, but reduced risk of event processors starting to process events again during mass indexing because a mass indexer agent is incorrectly considered disconnected.

期待一个毫秒的正整数,如 30000,或可以解析成该整数的字符串。

Expects a positive Integer value in milliseconds, such as 30000, or a String that can be parsed into such Integer value.

默认值:30000

Default value: 30000

hibernate.search.coordination.mass_indexer.pulse_interval

以毫秒为单位,批量索引器在必须执行“心跳”之前可以等待的时间。

How long, in milliseconds, the mass indexer can wait before it must perform a "pulse".

仅在 "hibernate.search.coordination.strategy" 是 "outbox-polling" 时可用。

Only available when "hibernate.search.coordination.strategy" is "outbox-polling".

每个代理自身都会在某个数据库中注册自己。定期地,大规模索引器会进行以下 “检查”:

Every agent registers itself in a database table. Regularly, the mass indexer performs a "pulse":

它更新它在表中的条目,让其他代理知道它仍处于活动状态并防止过期。

It updates its owm entry in the table, to let other agents know it’s still alive and prevent an expiration

它会从表中删除所有其他已过期的代理。

It removes any other agents that expired from the table

心跳间隔必须设置为介于 polling intervalexpiration interval 三分之一 (1/3) 之间的值:

The pulse interval must be set to a value between the polling interval and one third (1/3) of the expiration interval:

较低的值(接近轮询间隔)意味着降低了批量索引器中介错误地被认为已断开连接,因此事件处理器在批量索引期间重新开始处理事件的风险,但由于更频繁地更新中介表中批量索引器中介的条目,因此会增加数据库上的压力。

Low values (closer to the polling interval) mean reduced risk of event processors starting to process events again during mass indexing because a mass indexer agent is incorrectly considered disconnected, but more stress on the database because of more frequent updates of the mass indexer agent’s entry in the agent table.

较高的值(接近过期间隔)意味着批量索引器中介错误地被认为已断开连接,因此事件处理器在批量索引期间重新开始处理事件的风险增加,但由于不太频繁地更新中介表中批量索引器中介的条目,因此会减小数据库上的压力。

High values (closer to the expiration interval) mean increased risk of event processors starting to process events again during mass indexing because a mass indexer agent is incorrectly considered disconnected, but less stress on the database because of less frequent updates of the mass indexer agent’s entry in the agent table.

期望以毫秒为单位的正整数,例如 2000,或可以解析为该整数的字符串。

Expects a positive Integer value in milliseconds, such as 2000, or a String that can be parsed into such Integer value.

默认值:2000

Default value: 2000

hibernate.search.coordination.tenants

对于租户特定的协调特性的根属性,例如“hibernate.search.coordination.tenants.tenant1.something = somevalue”。

The root property for coordination properties specific to a tenant, e.g. "hibernate.search.coordination.tenants.tenant1.something = somevalue".

A.7. Hibernate Search Mapper - POJO Standalone

hibernate.search.indexing.mass.default_clean_operation

在非明确配置期间应用于批量索引的默认索引清理操作。

The default index cleaning operation to apply during mass indexing, unless configured explicitly.

需要 MassIndexingDefaultCleanOperation 值或此类值的字符串表示形式。

Expects a MassIndexingDefaultCleanOperation value, or a String representation of such value.

hibernate.search.indexing.plan.synchronization.strategy

如何在应用程序线程和由 SearchSessionindexing plan 触发的索引之间进行同步。

How to synchronize between application threads and indexing triggered by the SearchSession's indexing plan.

期待的是 IndexingPlanSynchronizationStrategy 中定义的一个字符串,或对 IndexingPlanSynchronizationStrategy 中类型的 Bean 的引用。

Expects one of the strings defined in IndexingPlanSynchronizationStrategy, or a reference to a bean of type IndexingPlanSynchronizationStrategy.

hibernate.search.mapping.build_missing_discovered_jandex_indexes

Hibernate Search 是否应自动为针对注解处理(特别是实体)注册的类型构建 Jandex 索引,以确保考虑那些 JAR 中的所有“根映射”注解(例如 ProjectionConstructor )。

Whether Hibernate Search should automatically build Jandex indexes for types registered for annotation processing (entities in particular), to ensure that all "root mapping" annotations in those JARs (e.g. ProjectionConstructor) are taken into account.

需要布尔值,例如 truefalse,或可解析为布尔值的字符串。

Expects a Boolean value such as true or false, or a string that can be parsed into a Boolean value.

默认值: true

Default value: true

hibernate.search.mapping.configurer

Hibernate Search 映射的配置器。

A configurer for the Hibernate Search mapping.

需要对类型 StandalonePojoMappingConfigurer 的 bean 的单值或多值引用。

Expects a single-valued or multi-valued reference to beans of type StandalonePojoMappingConfigurer.

默认为无值。

Defaults to no value.

hibernate.search.mapping.discover_annotated_types_from_root_mapping_annotations

Hibernate Search 是否应自动发现同时使用 root mapping annotations 注解的、存在于 Jandex 索引中的已注解类型。

Whether Hibernate Search should automatically discover annotated types present in the Jandex index that are also annotated with root mapping annotations.

当启用时,如果在 Jandex 索引中发现带有 RootMapping 元注解的注解,并且在 Jandex 索引中发现具有该注解(例如 SearchEntityProjectionConstructor)的类型,那么即使该类型没有显式添加,该类型也会自动被扫描以查找映射注解。

When enabled, if an annotation meta-annotated with RootMapping is found in the Jandex index, and a type annotated with that annotation (e.g. SearchEntity or ProjectionConstructor) is found in the Jandex index, then that type will automatically be scanned for mapping annotations, even if the type wasn’t explicitly added.

需要布尔值,例如 truefalse,或可解析为布尔值的字符串。

Expects a Boolean value such as true or false, or a string that can be parsed into a Boolean value.

默认值: true

Default value: true

hibernate.search.mapping.multi_tenancy.enabled

启用或禁用多租户。

Enables or disables multi-tenancy.

如果启用多租户,那么每个 session 都需要分配一个租户标识符。

If multi-tenancy is enabled, every session will need to be assigned a tenant identifier.

期待的是一个布尔值。

Expects a boolean value.

默认值:false

Default value: false

hibernate.search.mapping.multi_tenancy.tenant_identifier_converter

如何将租户标识符转换成字符串表示,或者从该表示转换成租户标识符。

How to convert tenant identifier to and form the string representation.

当启用多租户时,并且如果非字符串租户标识符被用作通过此属性提供的自定义转换器。

When multi-tenancy is enabled, and non-string tenant identifiers are used a custom converter must be provided through this property.

默认为 StandalonePojoMapperSettings.Defaults.MULTI_TENANCY_TENANT_IDENTIFIER_CONVERTER 。此转换器仅支持字符串租户标识符,如果使用其他类型的标识符,则它将失败。

Defaults to StandalonePojoMapperSettings.Defaults.MULTI_TENANCY_TENANT_IDENTIFIER_CONVERTER. This converter only supports string tenant identifiers and will fail if some other type of identifiers is used.

hibernate.search.schema_management.strategy

架构管理策略,控制如何在启动和关闭时创建、更新、验证或放弃索引及其架构。

The schema management strategy, controlling how indexes and their schema are created, updated, validated or dropped on startup and shutdown.

需要 SchemaManagementStrategyName 值,或者此类值的字符串表示形式。

Expects a SchemaManagementStrategyName value, or a String representation of such value.