lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Miller <>
Subject Re: SpanNearQuery's spans & payloads
Date Sat, 12 Sep 2009 17:54:28 GMT
So to modify the rules a bit to account for the ordered case (again, I
am sure of nothing):

1. Only one span can start from a term.
2. Start matching from the left and work right.
3. If the Span is ordered, upon finding a match, shrink the
   start position to the same term closest to the end term.

so for something like "s m m s m m s m n n"

find s within 5 of n, order matters s->n:

the first s is not within 5, the second s is within 5 -
we have a possible 3-8 (s->n), but its ordered
so now shrink that s to the closest s: 6-8 is the span.
The previous s's and second n will not be part of a span.
There is not another s after the matching s to start a
span from.

- Mark

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

View raw message