lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-3836) Most Codec.*Format().*Reader() methods should use SegmentReadState
Date Thu, 01 Mar 2012 15:09:57 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-3836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13220082#comment-13220082
] 

Michael McCandless commented on LUCENE-3836:
--------------------------------------------

{quote}
The background for this issue is that I started looking at updateable fields, where updates
are put in a segment (or reader) of its own and they provide an "overlay" for the main segment,
with a special codec magic to pull and remap data from the "overlay" as the main data is accessed.
However, in order to do that I need to provide this data when format readers are initialized.
I can't do this when creating a Codec instance (Codec is automatically instantiated) or when
creating Codec.*Format(), because format instances are usually shared as well.
{quote}

Sweet!

Couldn't the stacking/overlaying live "above" codec?  Eg, the codec thinks it's reading 3
segments, but really the code above knows there's 1 base segment and 2 stacked on top?
                
> Most Codec.*Format().*Reader() methods should use SegmentReadState
> ------------------------------------------------------------------
>
>                 Key: LUCENE-3836
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3836
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: core/codecs
>            Reporter: Andrzej Bialecki 
>            Assignee: Andrzej Bialecki 
>             Fix For: 4.0
>
>         Attachments: LUCENE-3836.patch
>
>
> Codec formats API for opening readers is inconsistent - sometimes it uses SegmentReadState,
in other cases it uses individual arguments that are already available via SegmentReadState.
This complicates extending the API, e.g. if additional per-segment state would need to be
passed to the readers.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message