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:
@@ -67,7 +67,10 @@ public class PostgreSQLBuilder
|
|||||||
appendIdentifier("ftsCol_" + rank.getDefinition().getName());
|
appendIdentifier("ftsCol_" + rank.getDefinition().getName());
|
||||||
_builder.append(", to_tsquery('").
|
_builder.append(", to_tsquery('").
|
||||||
append(translateFTConfig(getFTIndex(rank.getDefinition()).configuration())).
|
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) {
|
@Override public void visit (EpochSeconds epochSeconds) {
|
||||||
|
|||||||
Reference in New Issue
Block a user