Issues
- Optimistic concurrency controlHSEARCH-5105
- Support "skipping"/"pruning" with sorts by field value in the Lucene backendHSEARCH-5014
- Better highlighting/projections in nested fieldsHSEARCH-4977
- Better observability in Hibernate SearchHSEARCH-4970
- Document how to handle a schema change without search downtimeHSEARCH-4955
- Allow setting a fetch profile for loading entities when indexingHSEARCH-4945
- `.id()` projection / `@IdProjection` within object fieldsHSEARCH-4895
- Highlighting within an object() projection and on fields within nested fieldsHSEARCH-4841Marko Bekhta
- Improve performance of schema validation with Elasticsearch and many indexesHSEARCH-4651Yoann Rodière
- Built-in support for translating more complex entity IDs (@EmbeddedId, @IdClass, ...) into document IDsHSEARCH-4355
- Add howtos to the documentation for common use casesHSEARCH-4126
- Tracing indexing requests and search queriesHSEARCH-4057
- Predicate on multiple fields designated by a single label/group name/etc. ("_all", copy_to, ...)HSEARCH-3926
- Automatic reindexing on one-sided association updatesHSEARCH-3567
- Near-zero-downtime mass indexing when the schema did not changeHSEARCH-3499
- Add options for match predicates targeting multiple fieldsHSEARCH-3327
- Zero-downtime/hot schema updates for the Elasticsearch backendHSEARCH-2861
- Query based approach for reindexing resolutionHSEARCH-1937
- Expose indexing queue length and other backend performance metricsHSEARCH-1892
- Fetch only fields needed for indexing during index buildHSEARCH-1813
- @IndexedEmbedded.includePaths should allow to pick paths that were excluded from the embedded entityHSEARCH-1112
- MassIndexer with an update mechanismHSEARCH-1032
- Add match all terms option when matching in the DSL APIHSEARCH-917
- Improve performance of MassIndexer through Eager fetchingHSEARCH-521
24 of 24
Optimistic concurrency control
Description
Details
Details
Details
Created March 13, 2024 at 3:16 PM
Updated February 28, 2025 at 8:06 AM
Elasticsearch/OpenSearch offer support for optimistic concurrency control through versioning: (not to be confused with )
When using Hibernate Search in Standalone mode, it could be useful to have some form of
@DocumentVersion
.For example:
When using Elasticsearch/OpenSearch as a primary datastore, one could rely on auto-incrementing versions, and use a
@VersionProjection
(to be added) to retrieve the version before every update, therefore taking advantage of optimistic concurrency control.When using Elasticsearch/OpenSearch as a secondary datastore whose data is derived from another document datastore (e.g. MongoDB), one could rely on that other datastore’s own versioning mechanism, pushing the version explicitly on each update.
It’s less clear whether mapping Hibernate ORM’s own
@Version
to Elasticsearch/OpenSearch’s version actually is useful, because the “version” of indexed documents relates to more than just the root entity (there may be@IndexedEmbedded
involved, and embedded entities have their own version). But it’s less critical when using Hibernate ORM, since in that case one can use coordination with outbox polling, which achieves better concurrency control through sharding (there are never two nodes updating the same document at the same time).Support for concurrency control in Lucene may be challenging, so we may want to leave that out of scope for now.