[hibernate-issues] [JIRA] (HSEARCH-3834) Nested documents are never deleted

Yoann Rodière (JIRA) jira at hibernate.atlassian.net
Thu Feb 20 04:18:18 EST 2020


Yoann Rodière ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A58fa1ced-171a-4c00-97e8-5d70d442cc4b ) *updated* an issue

Hibernate Search ( https://hibernate.atlassian.net/browse/HSEARCH?atlOrigin=eyJpIjoiMGJmMDNkNDg3MDRhNDc1MGE4NjVkNGQ2MjYzYmZiNDAiLCJwIjoiaiJ9 ) / Bug ( https://hibernate.atlassian.net/browse/HSEARCH-3834?atlOrigin=eyJpIjoiMGJmMDNkNDg3MDRhNDc1MGE4NjVkNGQ2MjYzYmZiNDAiLCJwIjoiaiJ9 ) HSEARCH-3834 ( https://hibernate.atlassian.net/browse/HSEARCH-3834?atlOrigin=eyJpIjoiMGJmMDNkNDg3MDRhNDc1MGE4NjVkNGQ2MjYzYmZiNDAiLCJwIjoiaiJ9 ) Nested documents are never deleted ( https://hibernate.atlassian.net/browse/HSEARCH-3834?atlOrigin=eyJpIjoiMGJmMDNkNDg3MDRhNDc1MGE4NjVkNGQ2MjYzYmZiNDAiLCJwIjoiaiJ9 )

Change By: Yoann Rodière ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A58fa1ced-171a-4c00-97e8-5d70d442cc4b )

Our current code in the Lucene backend deletes only the root document, but leaves nested documents in the index.

That's because we use the "  {{  __HSEARCH_id "  }}  field to designate nested documents to delete, but nested documents to not have that field. Instead, they have a "  {{  __HSEARCH_root_id "  }}  field, and that field is not even indexed.
Maybe we should use the same ID field for nested documents?

I managed to check that locally using luke, but I believe we could design an automated test that creates a document with nested documents, deletes it, then recreates it without nested documents. The nested documents will magically still be matched when searching, which is an evidence there is a bug.

We should also check updates, since they rely on the same principle.

( https://hibernate.atlassian.net/browse/HSEARCH-3834#add-comment?atlOrigin=eyJpIjoiMGJmMDNkNDg3MDRhNDc1MGE4NjVkNGQ2MjYzYmZiNDAiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HSEARCH-3834#add-comment?atlOrigin=eyJpIjoiMGJmMDNkNDg3MDRhNDc1MGE4NjVkNGQ2MjYzYmZiNDAiLCJwIjoiaiJ9 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100121- sha1:b179e60 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200220/3fde393f/attachment.html 


More information about the hibernate-issues mailing list