[
https://issues.apache.org/jira/browse/LUCENE-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12661238#action_12661238
]
Mark Miller commented on LUCENE-1483:
-------------------------------------
Here is what that example policy has to be essentially. We just have to create
a good way to do the right conversion I guess. I'll work on whatever you don't
put up when you share your latest optimizations.
{code}
case SortField.STRING_ORD:
return new ComparatorPolicy(){
private FieldComparator comparator = new
FieldComparator.StringOrdComparator(numHits, field);
private boolean first = true;
private boolean second = true;
public FieldComparator nextComparator(FieldComparator oldComparator,
IndexReader reader, int numHits, int numSlotsFull)
throws IOException {
if(first) {
first = false;
return comparator;
} else if(second){
StringOrdValOnDemComparator comp = new
FieldComparator.StringOrdValOnDemComparator(numHits, field);
comp.values =
((FieldComparator.StringOrdComparator)comparator).values;
comp.ords = ((FieldComparator.StringOrdComparator)comparator).ords;
comp.currentReaderIndex = 1;
comparator = comp;
second = false;
return comp;
}
return comparator;
}};
{code}
> Change IndexSearcher multisegment searches to search each individual segment
> using a single HitCollector
> --------------------------------------------------------------------------------------------------------
>
> Key: LUCENE-1483
> URL: https://issues.apache.org/jira/browse/LUCENE-1483
> Project: Lucene - Java
> Issue Type: Improvement
> Affects Versions: 2.9
> Reporter: Mark Miller
> Priority: Minor
> Attachments: LUCENE-1483.patch, LUCENE-1483.patch, LUCENE-1483.patch,
> LUCENE-1483.patch, LUCENE-1483.patch, LUCENE-1483.patch, LUCENE-1483.patch,
> LUCENE-1483.patch, LUCENE-1483.patch, LUCENE-1483.patch, LUCENE-1483.patch,
> LUCENE-1483.patch, LUCENE-1483.patch, LUCENE-1483.patch, LUCENE-1483.patch,
> LUCENE-1483.patch, LUCENE-1483.patch, LUCENE-1483.patch, LUCENE-1483.patch,
> LUCENE-1483.patch, LUCENE-1483.patch, LUCENE-1483.patch, LUCENE-1483.patch,
> sortBench.py, sortCollate.py
>
>
> FieldCache and Filters are forced down to a single segment reader, allowing
> for individual segment reloading on reopen.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]