[hibernate-issues] [Hibernate-JIRA] Commented: (HSEARCH-425) Reimplement support for compressed fields (support removed in Lucene3)

Emmanuel Bernard (JIRA) noreply at atlassian.com
Wed Feb 17 13:57:47 EST 2010


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

Emmanuel Bernard commented on HSEARCH-425:
------------------------------------------

Here is a proposal to honor Store.COMPRESS

 - compress when a field is marked as COMPRESS using the CompressionTools.compress
Today, we pass Store.COMPRESS as a LuceneOptions to field bridges and they are responsible for passing the option forward to Field.

Ideally we should warn old field bridges that COMPRESS should no longer be passed as an option but rather use the compression logic: we probably need to ask bridges to call LuceneOptions.compressIfNeeded(Object value) before passing it to the Field instance.


 - decompress when a field is marked as COMPRESS using CompressionTools.decompress but silently catch any exception in the process (this could be an old style field decompressed by Lucene (2.x style)

TwoWayStringBridge#get(String, Document) should be deprecated and changed to
TwoWayStringBridge#get(String name, Document document, LuceneOptions)
When we move to Lucene 3, then this method must be removed.
FieldBridge should then use LuceneOptions#decompressIfNeeded() on the data received form the field

WDYT Sanne, any improvement possible?
I wish we could make it even more transparent but unfortunately Lucene 3 has deprecated FieldSelectorResult.LOAD_FOR_MERGE which loads the data as compressed all the time and not selectively.

> Reimplement support for compressed fields (support removed in Lucene3)
> ----------------------------------------------------------------------
>
>                 Key: HSEARCH-425
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-425
>             Project: Hibernate Search
>          Issue Type: Task
>          Components: documentation, mapping
>            Reporter: Sanne Grinovero
>            Assignee: Sanne Grinovero
>             Fix For: 3.2.0.Beta2
>
>
> "native" support was removed from Lucene3, we could re-implement it in another way, as described in Lucene's javadocs. Or drop the feature.

-- 
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