lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Elschot <>
Subject Ordered span query with more than 2 subqueries: avoid?
Date Thu, 01 Apr 2004 21:47:00 GMT
Dear readers,

(Not sure whether this would be better posted to lucene-user.)

A test of the ordered span query with three terms:
   w1  w2  w3
and slop 1 against document:
   w1 w3 w2 w3

The javadoc (1.4 rc3) of SpanNearQuery gives:
  Matches spans which are near one another. One can specify slop, the maximum
  number of intervening unmatched positions, as well as whether matches are
  required to be in-order. 

But the span search seems to scan the document from 

w1 w3 w2


w3 w2 w3

instead of allowing for the slop to match w1 . w2 w3.
Or is the test for ordered match in line 280
matchIsOrdered() too restrictive for this case?

Anyway, does this mean that I should not use an ordered SpanNearQuery
with some slop with more than 2 subqueries?

I'm testing a parser for the span queries,  so posting self contained
test code would require some coding around that parser.
I wouldn't mind doing that, but it would be superfluous if this
is the intended behaviour.

Kind regards,

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

View raw message