lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher M Collins <>
Subject SpanQuery and FilteredQuery
Date Mon, 25 Aug 2008 17:18:50 GMT


Can anyone tell me if it's possible to apply a filter to a SpanQuery and
still use query.getSpans(indexReader)?  I'm using getSpans to get back the
original positions in the text but I would like to filter the results
returned by getSpans.  I have a Filter I can apply if I just search with
the query, but I don't see a way to apply the filter and still use the
getSpans method.  I thought maybe FilteredQuery looked promising, but of
course if I wrap my SpanQuery and Filter in a FilteredQuery, getSpans is no
longer available.

Any suggestions? Thanks!

Christopher Collins \
Department of Computer Science \ University of Toronto
Collaborative User Experience Group \ IBM Research
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message