Changing default scoring function


From the docs (Scoring | Redis) default scoring function used for full text index querying is TF-IDF, with possibility to override the default using SCORER attribute. But is it possible to configure a different scoring function to be used by default when starting RedisSearch?



There is no configuration for the default scorer name and it is hard-coded as TFIDF.

Even if you register a different scorer extension, you would still need to explicitly specify it as an argument to FT.SEARCH.
(If you could register your own scorer with the default name TFIDF, you would be able to set a default arbitrary scorer, but I suppose it would fail when the real default TFIDF scorer would attempt to be registered, since it would fail the module initialization due to having the same name)

Maybe extending a client, e.g., redis-py, and adding your default SCORER name as an argument to the underlying search command?

1 Like