Hi,
> I don't find an elegant solution. reader.termDocs(null) returns AllTermDocs
> which doesn't exist in lucene 4.3.
>
>
> I use this piece of code
>
> Bits liveDocs = reader.getLiveDocs();
> for (int i = 0; i < reader.maxDoc(); ++i) {
> if (liveDocs != null && !liveDocs.get(i)) {
> continue;
> }
This is what termDocs(null) did internally in Lucene 3. So this code "looks"
not efficient but that is all you can do - and is not different than in earlier
Lucene versions.
Uwe
> 2013/7/8 Ian Lea <[email protected]>
>
> > There's a fair chunk of info on TermDocs and friends in the migration
> > guide. http://lucene.apache.org/core/4_3_1/MIGRATE.html
> >
> > Does that cover your question?
> >
> >
> > --
> > Ian.
> >
> >
> > On Mon, Jul 8, 2013 at 12:32 PM, Yonghui Zhao <[email protected]>
> > wrote:
> > > Hi,
> > >
> > > What's proper replacement of "TermDocs termDocs =
> > > reader.termDocs(null);“ in lucene 4.x It seems
> > > reader.termDocsEnum(term) can't take null as a input parameter.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]