lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: docBase Parameter in Collector.setNextReader
Date Thu, 12 Nov 2009 22:20:31 GMT
Could it that you are using the expert IndexSearcher ctor that takes the sub
reader array and docStarts?

Else it is impossible that all docBases are 0 (look into the code).

By the way, the docStarts should be 5 and then 0, as IndexSearcher starts to
search bigger segments first. Maybe this is your problem, that you have only
looked at the second call?

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

> -----Original Message-----
> From: Michael McCandless [mailto:lucene@mikemccandless.com]
> Sent: Thursday, November 12, 2009 11:15 PM
> To: java-user@lucene.apache.org
> Subject: Re: docBase Parameter in Collector.setNextReader
> 
> Yes it should be 0 and 5.
> 
> I'm not sure what would cause 0 and 0, offhand.
> 
> Can you make a small standalone test case showing it?
> 
> Mike
> 
> On Thu, Nov 12, 2009 at 4:25 PM, Benjamin Heilbrunn <benhei@gmail.com>
> wrote:
> > Hello everyone,
> >
> > I'm a little bit confused about the docBase parameter of
> > Collector.setNextReader.
> >
> > Imagine the following:
> >  - Create new Index
> >  - Index 5 docs
> >  - Call IndexWriter.commit()
> >  - Index 7 docs
> >  - Call IndexWriter.commit()
> >  - close Writer
> >
> > Now I have a 2-segment index right?
> >
> > I have implemented an own Collector. If I execute an all docs matching
> > query on the above case the Collectors setNextReader method is called
> > twice (as I expected).
> > But docBase both times equals 0. Shouldn't it be 0 and 5?
> >
> > What mistake could trigger such behaviour?
> >
> >
> > Benjamin
> >
> > ---------------------------------------------------------------------
> > 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



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