vespa
vespa copied to clipboard
Allow specifying rank feature configuration using query rank properties
Describe the bug We want to set custom 'averageFieldLength' via ranking.properties but it doesn't seem to be working.
To Reproduce
Pass bm25(data).averageFieldLength via query API params
http://container:8080/search/?ranking.properties.bm25(data).averageFieldLength=2000&ranking.profile=test-profile&query=contract&yql=select title,data from schema-xyz where userQuery() limit 50
rank-profile test-profile {
first-phase {
expression: bm25(data) + bm25(title)
}
match-features {
bm25(title)
bm25(data)
}
}
Expected behavior
Expect to see change in relevance score. It seems the bm25(data).averageFieldLength=2000 via Query API is not passed to internal bm25 feature correctly
Screenshots If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
- OS: Red Hat Enterprise Linux
- Infrastructure: self-hosted
- Versions 8.8 (Ootpa)
Vespa version Vespa 8.270.8
Additional context Add any other context about the problem here.
This isn't supported - you can only set it in a rank profile. If you want to try different values you need to create multiple rank profiles (that all inherit all other values) and choose between them in the query.
Let's convert this to a feature request.