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

Uwe Schindler commented on LUCENE-4304:
---------------------------------------

Hi,

I reviewed the FiterAtomicReader, looks much better now.

Minor improvment:
{noformat}
+    DirectoryReader reader = DirectoryReader.open(srcIndexDir);
+    ArrayList<AtomicReader> subReaders = new ArrayList<AtomicReader>();
+    for (AtomicReader sub : reader.getSequentialSubReaders()) {
+      subReaders.add(new OrdinalMappingAtomicReader(sub, ordinalMap, params));
+    }
{noformat}

I would use leaves(), although the DirectoryReader subs are atomic, but it 
would make the whole thing more universal useable (see also 
MultiPassIndexSplitter and PKIndexSplitter, which are similar). Also the size 
of leaves() or getSeqReaders() is known before, so you can directly use new 
AtomicReader[leaves().size()], so no copy/grow needed.
                
> Remove PayloadProcessProvider
> -----------------------------
>
>                 Key: LUCENE-4304
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4304
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Michael McCandless
>         Attachments: LUCENE-4304.patch
>
>
> Now that we have pluggable codecs (well, PostingsFormat), an app should use a 
> custom PostingsFormat if it really must change payloads while merging.
> Alternatively, use a FilteredIndexReader to modify anything during addIndexes 
> (eg the facets use case, modifying payloads).
> Since this capability can be handled by existing more-generic functions I 
> don't see why we need to keep PPP around in core.  PPP is also fragile 
> because an app generally has no visibility on when a merge commits so it 
> can't know if the payloads it retrieves are pre or post PPP.
> I think merging shouldn't change postings as a side-effect (by default, 
> anyway, since a custom PF can of course override merge and do whatever it 
> wants).

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

Reply via email to