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

Ranking rules does not work like documents #4545

Open
khanhan2k2eliai opened this issue Mar 30, 2024 · 1 comment
Open

Ranking rules does not work like documents #4545

khanhan2k2eliai opened this issue Mar 30, 2024 · 1 comment
Labels
needs more info This issue needs a minimal complete and verifiable example

Comments

@khanhan2k2eliai
Copy link

Describe the bug
Try to custom ranking rules but it does not work as expect, just first rule is working. For example:
My ranking Rules:
[
"sort",
"words",
"typo",
"proximity",
"attribute",
"exactness"
]
My Results are ranked by sort only. others do not work. I try to sort by created_at first and then sort the semantic score.
I attached my data test below.
data-test.json

@dureuill
Copy link
Contributor

dureuill commented Apr 1, 2024

Hello, with a quick look to your data it looks to me like no two documents are having the same created_at value.

If that is correct, there is nothing that remains to be ranked by the words ranking rule after the sort ranking rule has been applied, and the behavior is expected.

What behavior were you expecting to see vs. which behavior are you seeing. That is, for a given query, what is the order of documents you're seeing, and what is the order of documents you were expecting to see?

Having sort as the first ranking rule is reserved to niche use cases, because usually you want relevancy ranking rules applied first.

@dureuill dureuill added the needs more info This issue needs a minimal complete and verifiable example label Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs more info This issue needs a minimal complete and verifiable example
Projects
None yet
Development

No branches or pull requests

2 participants