lucene-java-user mailing list archives

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

Why did you add this note in SpanPayloadCheckQuery
"Do not use this with an SpanQuery that contains a SpanNearQuery
<http://lucene.apache.org/core/4_10_2/core/org/apache/lucene/search/spans/SpanNearQuery.html>.
Instead, use SpanNearPayloadCheckQuery
<http://lucene.apache.org/core/4_10_2/core/org/apache/lucene/search/spans/SpanNearPayloadCheckQuery.html>
since
it properly handles the fact that payloads aren't ordered by SpanNearQuery
<http://lucene.apache.org/core/4_10_2/core/org/apache/lucene/search/spans/SpanNearQuery.html>."
?
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

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