Yeah, it probably makes sense to add getSpans(IR, Filter)
On Sep 24, 2009, at 5:51 PM, Christopher Tignor wrote:
thanks for the tip.
I don't see a way to integrate the QueryWrapperFilter (or any
Filter) into
SpanTermQuery.getSpans(indexReader) however.
I can use a SpanQuery with an IndexSea
I should beef up that spans extractor - it can actually work on the
constantscore multi term queries (the base ones that now have a constant
score mode in 2.9), just like the Highlighter does. That class really
belongs in contrib probably.
You can use the filter and the spanquery to get the result
thanks for the tip.
I don't see a way to integrate the QueryWrapperFilter (or any Filter) into
SpanTermQuery.getSpans(indexReader) however.
I can use a SpanQuery with an IndexSearcher as per susual but that leaves me
back where I started. Any thoughts?
Also, I will need to sort these results by
: But alas, I cannot seem to get access to any TermPositions from my above
: BooleanQuery.
I would suggest refactoring your "date" restriction into a Filter (there's
fairly easy to use Filter that wraps a Query) and then execute a
SPanTermQuery just as you describe.
-Hoss
--
Hello,
I have indexed documents with two fields, "ARTICLE" for an article of text
and "PUB_DATE" for the article's publication date.
Given a specific single word, I want to search my index for all documents
that contain this word within the last two weeks, and have them sorted by
date:
TermQuery