lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shay Hummel <>
Subject Span near query with payloads
Date Tue, 14 Apr 2015 17:24:39 GMT

Why did you add this note in SpanPayloadCheckQuery
"Do not use this with an SpanQuery that contains a SpanNearQuery
Instead, use SpanNearPayloadCheckQuery
it properly handles the fact that payloads aren't ordered by SpanNearQuery
I used SpanNearQuery and provided, as its clauses[], an array of
SpanPayloadCheckQuery and it seems to work OK?

What I am trying to do is search terms in a certain window which each term
has its own payload. I use the payload to code part of speech.

for example:
Doc1: I booked a flight. (booked is a verb, flight is a noun)
Doc2: I read the book the Hobbit during the flight to London. (book is a
noun, flight is a noun)

when I searched "book flight" with (verb and noun as payload respectively)
it worked for the correct window (depends If i removed stopwords or
not) properly.

So what did you mean with this note?

Thank you,

Shay Hummel

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message