You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Boris Galitsky <bg...@loglogic.com> on 2006/04/17 20:12:04 UTC

how to match Documents from Hits with Documents from Query Spans?

Hello

 

I am using span queries to get hits (Documents) and occurrences
(positions) of search terms within these documents.

For some reason, there is a disagreement between the order the Documents
are returned in hits, and the Documents are referenced (via order
number, starting from 0) in the Spans?

 

The problem is depicted at the diagram below

 

 

Query => Lucene => hits ->Documents

|                                                               |

Spans -> doc(), start(), end()                       |

                 \-----------------------------????????----

                        

 

Lucene gets a Query and gives away hits with resultant Documents, and
the occurrences of search expression are obtained form the Query. Why is
there such an odd logic? Again, how to match Documents from Hits with
Documents from Query Spans?

 

Regards

Boris