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

Adrien Grand commented on LUCENE-4539:
--------------------------------------

bq. except SortedSource

Perhaps we should do what the TODO comment in your patch suggests (the two 
seeks to read metadata) and upgrade the version number to write all metadata at 
the beginning of the stream?

Semi-related discussion: the getDirectReaderNoHeader method should probably 
take an additional long (the start pointer) as an argument so that there is no 
need to seek to get an instance if the cursor is not at the right place.
                
> DocValues impls should read all headers up-front instead of per-directsource
> ----------------------------------------------------------------------------
>
>                 Key: LUCENE-4539
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4539
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/index
>            Reporter: Robert Muir
>         Attachments: LUCENE-4539.patch
>
>
> Currently, when DocValues opens, it just opens files. it doesnt read codec 
> headers etc.
> Instead we read these every single time a directsource opens. 
> I think it should work like PostingsReaders: e.g. the PackedInts impl would 
> read its versioning info and codec headers and creating a new Direct impl 
> should be a IndexInput.clone() + getDirectReaderNoHeader().
> Today its much more costly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Reply via email to