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

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

Boris Galitsky
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