Skip to content

Commit

Permalink
Added comment about tie-breaking rules for documents with the same sc…
Browse files Browse the repository at this point in the history
…ore (castorini#1438)

Explanation for castorini#1437
  • Loading branch information
lintool authored Dec 12, 2020
1 parent 0b80a02 commit 5f2a0a5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/io/anserini/search/SearchCollection.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@
* Main entry point for search.
*/
public final class SearchCollection implements Closeable {
// These are the default tie-breaking rules for documents that end up with the same score with respect to a query.
// For most collections, docids are strings, and we break ties by lexicographic sort order. For tweets, docids are
// longs, and we break ties by reverse numerical sort order (i.e., most recent tweet first). This means that searching
// tweets requires a slightly different code path, which is enabled by the -searchtweets option in SearchArgs.
public static final Sort BREAK_SCORE_TIES_BY_DOCID =
new Sort(SortField.FIELD_SCORE, new SortField(IndexArgs.ID, SortField.Type.STRING_VAL));
public static final Sort BREAK_SCORE_TIES_BY_TWEETID =
Expand Down

0 comments on commit 5f2a0a5

Please sign in to comment.