lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boris Galitsky" <bg7...@rambler.ru>
Subject Re: How to get Document (or filename) from Span
Date Tue, 18 Apr 2006 18:22:55 GMT
I fully understand now. Thanks a lot
Boris

On Tue, 18 Apr 2006 11:10:20 -0700 (PDT)
  Chris Hostetter <hossman_lucene@fucit.org> wrote:
> 
> : The question is when I get Spans, I get start/end positions and a
> : Document order (starting from 0), not the Document object itself 
>from
> 
> Are you sure about that?  Spans.doc() should return you the internal
> document Identifier which you can pass to indexReader.doc(int)
> 
> : which I could get a filename. Since I believe there is no way to 
>get a
> : Document object from Spans, and there is no such thing as Document 
>ID
> : in Lucene (right?) I attempt to have the same order for
> : Hits and for Spans (the indexing order) and retrieve Document for 
>each
> : Spans this way.
> 
> Documents do have Document IDs, assigned based on index order. 
> that's
> what Hits.id() returns.
> 
>FYI: take a look at the TestSpans.testSpanNearOrderedOverlap class 
>for an
> example of how the Spans class works. (it's what i'm using as a 
>basis for
> my suggestion as to how to use the class -- i've never used it 
>myself)
> 
> 
> 
> 
> -Hoss
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
>For additional commands, e-mail: java-dev-help@lucene.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message