lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: TopDocCollector vs TopScoreDocCollector (semantics changed in 4.0, not backward comptabile)
Date Wed, 27 Feb 2013 22:58:54 GMT
You have to implement setNextReader in your collector. In setNextReader() save the AtomicReader
from context.reader() in a field and use it from the collect method.

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de

> -----Original Message-----
> From: saisantoshi [mailto:saisantoshi76@gmail.com]
> Sent: Wednesday, February 27, 2013 11:51 PM
> To: java-user@lucene.apache.org
> Subject: RE: TopDocCollector vs TopScoreDocCollector (semantics changed in
> 4.0, not backward comptabile)
> 
> Thanks. Is there any issue the way we are calling the
> indexReader.getDocument(doc)?
> 
> Not sure how do I get an AtomicReaderConext in the following below
> method?
> Any pointers on how do I get that instance is appreciated?
> 
> public void collect(int doc) throws IOException {
>     // ADD YOUR CUSTOM LOGIC HERE
> 
>  *  How do I get an AtomicReader context here? *
> 
>      delegate.collect(doc);
>    }
> 
> Thanks and appreciate your help here.
> 
> 
> 
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/TopDocCollector-vs-
> TopScoreDocCollector-semantics-changed-in-4-0-not-backward-comptabile-
> tp4035806p4043497.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org


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


Mime
View raw message