Skip to content

Full Text Search ordering by match strength or rank #3820

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

Closed
Raflos10 opened this issue Dec 17, 2024 · 1 comment
Closed

Full Text Search ordering by match strength or rank #3820

Raflos10 opened this issue Dec 17, 2024 · 1 comment

Comments

@Raflos10
Copy link

Problem

Currently FTS through postgrest is not very useful for large or even medium data sets because the results are not guaranteed to be in the relevant order. Using something like ts_rank as an order parameter isn't currently supported.

So the only option is to sort based on something less relevant (such as some other column) or make a custom function for text searching, defeating the purpose of even having FTS in postgrest.

I would even argue that without ts_rank or some other method, it would be better to not even have FTS in postgrest at all, because it consumes developers time to create a search implementation using postgrest only to have to redo the implementation later with a custom function after discovering there's no good way to order the results.

Solution

Either support ts_rank in the order parameter, the FTS parameter, a new parameter, or any other implementation to support ranking FTS results.

@wolfgangwalther
Copy link
Member

Duplicate of #1758 and potentially #2989.

@wolfgangwalther wolfgangwalther closed this as not planned Won't fix, can't repro, duplicate, stale Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants