On Thu, Sep 11, 2008 at 10:31 PM, Lance Norskog <[EMAIL PROTECTED]> wrote: > Is it possible to add a bias to the ordering in the distributed search > feature? That is, if the search finds the same content in two different > indexes, it always favors the document from the first index over the second.
Handling duplicates is not currently done as a feature, but as a check against a mistake. It's not currently deterministic... first one returned will win. Here's the relevant code from QueryComponent: String prevShard = uniqueDoc.put(id, srsp.getShard()); if (prevShard != null) { // duplicate detected numFound--; // For now, just always use the first encountered since we can't currently // remove the previous one added to the priority queue. If we switched // to the Java5 PriorityQueue, this would be easier. continue; // make which duplicate is used deterministic based on shard // if (prevShard.compareTo(srsp.shard) >= 0) { // TODO: remove previous from priority queue // continue; // } }