[
https://issues.apache.org/jira/browse/LUCENE-3736?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael McCandless updated LUCENE-3736:
---------------------------------------
Attachment: LUCENE-3736.patch
bq. I attached a new patch with some obsolete code removed
Thanks Uwe!
bq. One check could be added instead: currently only maxDocs of subs are
compared, maybe also numDocs.... But also here the check is done by the invoked
ctors for the wrapped subreaders already.
OK sounds like we can rely on the invoked ctors to catch this.
bq. Otherwise I am not happy with the telescopic ctor (sorry, builder looked
better for the expert case - this is now unreadable).
Well, but the common case is simpler? And, no longer an API break,
besides the name change. Ie, you create the PAR/PCR like you do on
3.x. I think that's the right tradeoff (expert case can be more
work...).
I also don't like the API inconsistency this would start (we don't use
builders to create other IndexReaders).
bq. The good thing is that we could add freedom so storedFieldsReaders can be
completely separate. It would be easy to implement:
closeSubReaders/parallelReaders arrays would need to be an union of both sets
(currently only readers ctor param).
True, actually this would be pretty simple now I think?
bq. One small thing for "safety": MultiReader currently clones the reader
arrays to prevent external modification. Both ParallelReaders should do the
same. The builder enforced that before as you had no access to the subs and the
array was cloned on building (copy from ArrayList->array).
Ahh, right.
I started from your patch, added the array clones, and added the
missing javadocs... I didn't yet add allowing arbitrary
storedFieldsReaders but I think this wouldn't be so hard...
> ParallelReader is now atomic, rename to ParallelAtomicReader and also add a
> ParallelCompositeReader (that requires LogDocMergePolicy to have identical
> subreader structure)
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: LUCENE-3736
> URL: https://issues.apache.org/jira/browse/LUCENE-3736
> Project: Lucene - Java
> Issue Type: Sub-task
> Components: core/index
> Reporter: Uwe Schindler
> Assignee: Michael McCandless
> Fix For: 4.0
>
> Attachments: LUCENE-3733.patch, LUCENE-3736.patch, LUCENE-3736.patch,
> LUCENE-3736.patch, LUCENE-3736.patch, LUCENE-3736.patch, LUCENE-3736.patch,
> LUCENE-3736.patch
>
>
> The plan is:
> - Move all subreaders to ctor (builder-like API. First build reader-set, then
> call build)
> - Rename ParallelReader to ParallelAtomicReader
> - Add a ParallelCompositeReader with same builder API, but taking any
> CompositeReader-set and checks them that they are aligned (docStarts
> identical). The subreaders are ParallelAtomicReaders.
--
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: [email protected]
For additional commands, e-mail: [email protected]