Conversation
3a71f9b to
f8825ba
Compare
unaccent to SearchFilter (based on #7733)unaccent to SearchFilter
f8825ba to
2ff3f77
Compare
2ff3f77 to
a2bb1fb
Compare
|
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 |
|
I move this PR to Thank you! |
|
Tried this locally and the unaccent works great. It got me thinking though: anyone using |
a2bb1fb to
f195dec
Compare
|
This 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.
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 |
|
This 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. |
Yes! But is because the test is not being run over a PostgreSQL database, right? I've tried adding this |
468d800 to
227b72f
Compare
|
I've noticed that @ search never had a test with How bad it would be add this without testing? (as it is the same case) |
|
Hi @browniebroke! Just wondering if my last comment makes sense, or if you have any suggestions. Thank you! |
Yes precisely. We've got some blind spots in our test coverage and we're trying to cover these kind of missing cases |
|
Hi @browniebroke ! How would I add tests that run on Postgres? |
|
Thank you @auvipy for the update! Let me know if there's anything I can help! |
|
I've added a PR to configure CI to run with Postgres and add missing test coverage for full text search filter. If you cherry pick that commit here that should unblock you to write tests. |
|
Thank you @browniebroke !! I'll do it!! |
a154037 to
69967f9
Compare
|
Integrating this feature as-is seems a bit risky. It was added with the note that it is specific to PostgreSQL, but there is no explicit flag for this. If this addition must be made, it should be done alongside a few changes:
Rather than directly adding this feature to the core-drf code as it stands now, it would be a much safer and more professional approach to implement it via a plugin or as an optional feature that can be enabled. |
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