[hibernate-issues] [Hibernate-JIRA] Commented: (HSEARCH-5) Only index an entity when it's index properties have physically changed

Stephane Epardaud (JIRA) noreply at atlassian.com
Wed Sep 10 09:47:04 EDT 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-5?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=31142#action_31142 ] 

Stephane Epardaud commented on HSEARCH-5:
-----------------------------------------

Both patches are needed for me, but the second one isn't if you aren't embedding indexes with no prefix.

In order to solve the problem we had I added a hash of the indexed data to the Lucene document so we can compare the new Lucene Document we're about to add with the previously stored Document if any exists.

I am not happy with the way I load the old Lucene document from DocumentBuilder but I didn't find any other way.

I am not happy with the cost of building the field names used for hashing as it is concatenating a lot, and could be improved with using a reusable char array where we only overwrite the end to change the current field name as we hash along. 

The reason for this costly and vast usage of absolute field names (as opposed to the _normal_ field names) is that several fields may have the same field name. I am also using indexes in the absolute field names so that different @Field in @Fields can be differentiated.

This patch increased the speed of some operations by 10, because it avoids index rebuilding propagation to @ContainedIn entities when the entity hasn't changed as fas as HS is concerned.

> Only index an entity when it's index properties have physically changed
> -----------------------------------------------------------------------
>
>                 Key: HSEARCH-5
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-5
>             Project: Hibernate Search
>          Issue Type: New Feature
>          Components: engine
>            Reporter: Emmanuel Bernard
>            Priority: Minor
>         Attachments: hibernate-search-3.0.1.GA-hashing_patch.diff, hibernate-search-3.0.1.GA-id_field_patch.diff
>
>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list