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

Query pulling back unnecessary objects when embedded object gets updated and resulting in performance issue

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects versions: 4.4.4.Final
    • Fix versions: None
    • Components: mapper-pojo
    • Environment:
      4.4.4.Final, Mysql
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

      Description

      We have been having serious performance issues caused by updating fields in an embedded object. Specifically, we are using a class structure where "Account" is embedded in "User" is embedded in "Lesson", both of these associations being marked with the "@IndexedEmbedded(includePaths {**********})" notation on the owner side, with "@ContainedIn" marking the owned side. Paths specified are only one level deep and do not point to the described associations. When trying to update a field in "Account", Hibernate Search is making inefficient and unnecessary database queries:

      1. Pulling back unnecessary objects
      When updating an account, Hibernate Search tries to pull back both Users and Lessons, even though no change occurs in any fields accessible by Lesson(example Query 1 in attachments).

      2. Inefficient Query
      Hibernate Search gets user from account and then gets account from user (Query 2 in attachments).

      We have tried several permutations of "includePaths" and "depth =" specifications, none of which have solved the issue.

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ylang ylang
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 12h
                  12h
                  Remaining:
                  Remaining Estimate - 12h
                  12h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified