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. Regards, Paul Elschot --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]