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 results, then do your getSpans call on those results to get the positions (the same way you might have used the span extractor, or that the highlighter works - a doc at a time on the already matching docs). -- - Mark http://www.lucidimagination.com 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 IndexSearcher as per susual but that leaves me > back where I started. Any thoughts? > > Also, I will need to sort these results by date so that the most recent, > say 5 are returned... > > thanks again, > > C>T> > > On Thu, Sep 24, 2009 at 3:22 PM, Chris Hostetter > <hossman_luc...@fucit.org>wrote: > > >> : 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 >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org >> For additional commands, e-mail: java-user-h...@lucene.apache.org >> >> >> > > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org