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;
}
to replace
TermDocs termDocs = reader.termDocs(null);
while(termDocs.next())
{
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]
>
>