-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Support different types of search filters (SQLAlchemy) #558
Comments
@gdoctor I'd love to have this included in |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Filter Version: SQLAlchemy
Currently, the
search
query parameter translates to a SQL query with this form:For my use case, I prefer to create trigram indexes and search on that index with this form:
Additionally, I will want to search using tsvectors/tsqueries in the near future. I propose we create a search Enum, specific to the sqlalchemy filter code, that will have the values ILIKE_OR (current version), TRIGRAM, TSVECTOR (maybe a few others). It's actually quite easy to implement and I am running it in my project. I would be happy to put together a PR if there is interest in search customization like this.
I would also take care of coalescing nullable columns to ensure our search results are accurate.
Adding just the TRIGRAM search looks roughly like this but my PR would be much cleaner:
The text was updated successfully, but these errors were encountered: