Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7k
Addunaccent
toSearchFilter
#9385
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
3a71f9b
tof8825ba
Compareunaccent
toSearchFilter
(based on #7733)unaccent
toSearchFilter
f8825ba
to2ff3f77
Compare2ff3f77
toa2bb1fb
Comparemgaligniana commentedApr 15, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Hi@auvipy! In case I would like to add a postgres db creation step, to be able to add new tests: should I add a step here |
mgaligniana commentedMay 27, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I move this PR to Thank you! |
jensjeflensje commentedAug 29, 2024
Tried this locally and the unaccent works great. It got me thinking though: anyone using |
a2bb1fb
tof195dec
CompareThis issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull Request Overview
This PR adds unaccent support to the SearchFilter, enabling accent‐insensitive searches on PostgreSQL by mapping the "&" prefix to the "unaccent" lookup.
- Updates the lookup prefixes in the SearchFilter backend
- Introduces a PostgreSQL‑specific test for unaccent search
- Updates the API documentation to include the new lookup operator
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
tests/test_filters.py | Added a new test class that verifies unaccent search functionality |
rest_framework/filters.py | Updated lookup prefixes to include the unaccent operator |
docs/api-guide/filtering.md | Added new documentation row for accent‑insensitive unaccent search lookup |
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
auvipy left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
test is failing with following error
raise FieldError(
E django.core.exceptions.FieldError: Unsupported lookup 'unaccent' for CharField or join on the field not permitted.
Uh oh!
There was an error while loading.Please reload this page.
Description
Based on discussion#7759 I've created this PR to continue the work made in#8775 and#7733
There are no tests with PostgreSQL but I'm creating this to test with the CI