Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-User

SpanQuery and FilteredQuery

 

 

Lucene java-user RSS feed   Index | Next | Previous | View Threaded


collinmc at us

Aug 25, 2008, 10:18 AM

Post #1 of 2 (422 views)
Permalink
SpanQuery and FilteredQuery

Hello,

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!

Chris
______________________________________________________________
Christopher Collins \ http://www.cs.utoronto.ca/~ccollins
Department of Computer Science \ University of Toronto
Collaborative User Experience Group \ IBM Research


eransevi at gmail

Aug 26, 2008, 5:05 AM

Post #2 of 2 (371 views)
Permalink
Re: SpanQuery and FilteredQuery [In reply to]

Hi Chris,
I asked exactly the same question a little while ago and got a pretty good
answer from Paul Elschot.
Try searching the archives for 'Filtering a SpanQuery'. It was around the
13/5/08.

Hope it helps,
Eran.

On Mon, Aug 25, 2008 at 8:18 PM, Christopher M Collins
<collinmc [at] us>wrote:

>
> Hello,
>
> 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!
>
> Chris
> ______________________________________________________________
> Christopher Collins \ http://www.cs.utoronto.ca/~ccollins
> Department of Computer Science \ University of Toronto
> Collaborative User Experience Group \ IBM Research

Lucene java-user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.