Oops. We were not taking the size of the matched-against column into account at all. That's not intuitive. The more precise the match, the higher we want to rank it.

This commit is contained in:
Par Winzell
2009-03-29 19:55:24 +00:00
parent 34599bc760
commit b2bd4b51f7
@@ -67,7 +67,10 @@ public class PostgreSQLBuilder
appendIdentifier("ftsCol_" + rank.getDefinition().getName());
_builder.append(", to_tsquery('").
append(translateFTConfig(getFTIndex(rank.getDefinition()).configuration())).
append("', ?), 32)");
// TODO: The normalization parameter is really quite important, and should
// TODO: perhaps be configurable, but for the moment we hard-code it to 1:
// TODO: "divides the rank by the 1 + logarithm of the document length"
append("', ?), 1)");
}
@Override public void visit (EpochSeconds epochSeconds) {