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

feat: search score in search results #300

Open
dopry opened this issue Jan 14, 2023 · 0 comments
Open

feat: search score in search results #300

dopry opened this issue Jan 14, 2023 · 0 comments

Comments

@dopry
Copy link
Collaborator

dopry commented Jan 14, 2023

It would be nice to be able to query the annotated search score on queries like { pages(searchQuery: "keyword") { ... } }

When searchQuery isn't provided it would return None
When the search backend doesn't support scoring (looking at you sqlite) it would return None.

I did a test by adding qs.annotate_score("search_score") in grapple.utils.resolve_queryset an grapple.utils.resolve_paginated_queryset and updating page interface with postgres and it's working... but the changes to implement testing with postgres run deep.

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

1 participant