I have a need to favor documents from one shard over another when duplicates
occur. I found this code in the query component:

          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;
            // }
          }


Is there a ticket open for this issue? What would it take to fix?

Thanks,
Mike

Reply via email to