Marc Hadfield wrote:
In the SpanNear (or for that matter PhraseQuery), one can set a slop
value where 0 (zero) means one following after the other.
How can one differentiate between Terms at the **same** position vs. one
after the other?
The following queries only match "x" and "y" at the same position:
Query pq = new PhraseQuery();
pq.add(new Term("f", "x"), 0);
pq.add(new Term("f", "y"), 0);
Query sq =
new SpanNearQuery(new SpanQuery[]
{ new SpanTermQuery(new Term("f", "x")),
new SpanTermQuery(new Term("f", "y")) },
0, false);
Doug
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]