The problem/use-case that the feature addresses
Custom use cases where built-in scoring and stemming isn't sufficient. This is already present in Redis Search
Description of the feature
RS allows passing an EXTLOAD parameter with a dynamic object that defines several functions per a specific ABI. These functions provide ways for users to use custom or proprietary algorithms which would otherwise be inaccessible to them.
void MyQueryExpander(RSQueryExpanderCtx *ctx, RSToken *token) {
...
}
double MyScoringFunction(RSScoringFunctionCtx *ctx, RSIndexResult *res,
RSDocumentMetadata *dmd, double minScore);
....
if (ctx->RegisterScoringFunction("my_scorer", MyCustomScorer, NULL, NULL) == REDISEARCH_ERR) {
return REDISEARCH_ERR;
}
/* Register a query expander */
if (ctx->RegisterQueryExpander("my_expander", MyExpander, NULL, NULL) ==
REDISEARCH_ERR) {
return REDISEARCH_ERR;
}
return REDISEARCH_OK;
The problem/use-case that the feature addresses
Custom use cases where built-in scoring and stemming isn't sufficient. This is already present in Redis Search
Description of the feature
RS allows passing an
EXTLOADparameter with a dynamic object that defines several functions per a specific ABI. These functions provide ways for users to use custom or proprietary algorithms which would otherwise be inaccessible to them.