lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Aylward <r...@glassdoor.com>
Subject TopDocsCollector and sorting
Date Wed, 16 Mar 2011 00:48:10 GMT
Does the TopDocsCollector sort the docs it returns?

The java doc for...

public final TopDocs topDocs(int start)

states....

Returns the documents in the range [start .. pq.size()) that were collected by this collector.
Note that if start >= pq.size(), an empty TopDocs is returned.
This method is convenient to call if the application always asks for the last results, starting
from the last 'page'.

So it returns the proper results for a given page, but it is not clear that  it sorts the
results for that page.

I would have thought it does sort the results for the returned docs, but I'm seeing some results
that show that the results are not sorted.

Thanks,
Ryan



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message