lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Tignor <>
Subject SpanQuery for Terms at same position
Date Thu, 19 Nov 2009 22:28:09 GMT

I would like to search for all documents that contain both "plan" and "_v"
(my part of speech token for verb) at the same position.
I have tokenized the documents accordingly so these tokens exists at the
same location.

I can achieve programaticaly using PhraseQueries by adding the Terms
explicitly at the same position but I need to be able to recover the Payload
data for each
term found within the matched instance of my query.

Unfortunately the PayloadSpanUtil doesn't seem to return the same results as
the PhraseQuery, possibly becuase it is converting it inoto Spans first
which do not support searching for Terms at the same document position?

Any help appreciated.




Christopher Tignor | Senior Software Architect
155 Spring Street NY, NY 10012
p.212-285-8600 x385 f.212-285-8999

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