Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow specifying rank feature configuration using query rank properties #31211

Open
mohsin36 opened this issue May 15, 2024 · 1 comment
Open
Milestone

Comments

@mohsin36
Copy link

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.

@bratseth
Copy link
Member

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.

@bratseth bratseth changed the title How to specify averageFieldLength bm25 rank property via Query API param? Allow specifying rank feature configuration using query rank properties May 15, 2024
@kkraune kkraune added this to the later milestone May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants