: 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]