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

Should search results be sorted by score always? #479

Open
michaldrabik opened this issue Sep 27, 2024 · 2 comments
Open

Should search results be sorted by score always? #479

michaldrabik opened this issue Sep 27, 2024 · 2 comments

Comments

@michaldrabik
Copy link

Reporting a possible bug (?) As far as I understand search results should always return sorted by score which Is a value determining relevancy. Docs report that:

Search all text fields that a media object contains (i.e. title, overview, etc). Results are ordered by the most relevant score.

If you take this example it seems like it is not always the case:

https://api.trakt.tv/search/show,movie?extended=full&limit=20&query=from

Results are:

image

Is there a possible problem here or I misunderstand "score" in general?
Thanks team!

@rectifyer
Copy link
Contributor

It does an exact title match first, which I'm guessing are those first items.

@michaldrabik
Copy link
Author

Understood.

Yeah in the example first show is "From". Next movie is Spiderman Far From Home.

So it's just a question if score should be updated to the highest before returning the list on the backend side. Or just mention it in docs. That's because if you sort by score on the frontend you will change intended results order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants