Uploaded image for project: 'Hibernate Search'
  1. HSEARCH-2074

@ContainedIn triggers too much works when there is not "depth" on the corresponding @IndexedEmbedded

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects versions: 4.5.2.Final, 5.5.1.Final, 5.5.2.Final
    • Fix versions: 5.5.2.Final, 5.6.0.Alpha1
    • Components: engine
    • Labels:
      None
    • Environment:
      Any (test case provided)

      Description

      When dealing with large entities with many indexed fields, we would like to use @IndexedEmbedded.includePath feature, as opposed to @IndexedEmbedded.depth, so that the set of embedded entities that trigger a full reindexing of the parent entity (because of a @ContainedIn) is minimal.
      Unfortunately, it seems that when an entity is changed, Hibernate Search jumps from entity to entity based on the @ContainedIn annotations and on the @IndexedEmbbedded.depth feature. So, if @IndexedEmbedded.depth keeps its default value (which often is the case when using includePaths) it will ultimately jump to unnecessary entities.

      This description probably isn't very clear, so here's a test case: https://github.com/hibernate/hibernate-search/pull/965

      Important note: this bug also affects branch 4.5, which would greatly benefit from backporting the eventual fix.

      Might be related: HSEARCH-638 Closed
      Possible duplicate (not sure, since it's not the same version): HSEARCH-1701 Open

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                yrodiere Yoann Rodière
                Reporter:
                yrodiere Yoann Rodière
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: