On 14-May-07, at 1:35 AM, James liu wrote:
if use multi index box, how to pagination with sort by score
correctly?
for example, i wanna query "search" with 60 index box and sort by
score.
i don't know the num found from every index box which have different
content.
if promise 10 page with sort score correctly, i think solr 's start
is 0,
and rows is 100.(10 result per page)
60*100=6000, sort it and get top 100 to cache.
it is very slove although it promise 10 page with sort score
correctly.
With few index partitions, you it is sufficient to ask for startAt
+numNeeded docs from each partition and sort globally. Normally if
you wanted 10 for the first page, you would ask for 10 from each
server and cache the remainder. It is better to ask for more later
if the user asks for page ten.
When you get up to 60 partitions, you should make it a multi stage
process. Assuming your partitions are disjoint and evenly
distributed, estimate the number of documents that will appear in the
final result from each. Double or triple that (and put a minimum
threshold), try to assemble the number of documents you require, and
if one partition "runs out" of docs before it is done, request a new
round.
-Mike