lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Elschot <paul.elsc...@xs4all.nl>
Subject Re: Using SpanNearQuery.getSpans() in a Search Result
Date Thu, 02 Apr 2009 17:22:12 GMT
On Thursday 02 April 2009 15:36:44 David Seltzer wrote:
> Hi all,
> 
>  
> 
> I'm trying to figure out how to use SpanNearQuery.getSpans(IndexReader)
> when working with a result set from a query. 
> 
>  
> 
> Maybe I have a fundamental misunderstanding of what an IndexReader is -
> I'm under the impression that it's a mechanism for sequentially
> accessing the documents in an index. So I'm not really sure how that
> helps me find the spans inside a search result.
> 
>  
> 
> My problem is compounded by the fact that I'm using
> ParallelMultiSearcher so I'm not even 100% sure that I know what index
> each Hit is located in.

It's the other way around: for span queries a search result is created
(internally, by SpanScorer) from the spans resulting from the getSpans()
method above.

Does that help?

Regards,
Paul Elschot

> 
>  
> 
> All of the examples I find (in LIA and from CNLP) demonstrate on an
> in-memory index created for the sake of the example.
> 
> Can anyone give me any guidance on this?
> 
>  
> 
> Thanks!
> 
>  
> 
> -Dave 
> 
>  
> 
> 

Mime
  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message