lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Elschot <>
Subject Re: BufferedIndexInput.readByte performance; Spans not unique
Date Sat, 27 May 2006 13:02:11 GMT
On Saturday 27 May 2006 13:39, Michael Chan wrote:
> > A few things might help:
> > - use getSpans() on the scorer of the query, iterate the resulting Spans
> >   and count the number of different doc values.
> >   This saves the scoring and the sorting on score value.
> Thanks for your advice. I was wondering, is each span given by
> getSpans() a unique match according to the given query?

Not always: it is possible for different terms to be indexed in the
same position, and it is also possible to create a SpanOrQuery
in which the same Span(Term)Query occurs more than once.
The spans will be ordered, so in case they are not unique, the
ones with the same begin/end positions in the same doc will
be consecutive.

Paul Elschot

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message