-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 exclusion file filters #826
Conversation
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.
Hey @srikary12, just left 1 comment (to add tests) but otherwise changes look good! Excited to get file filters to word filter parity
@debanjum Can you check and let me know if it's working fine. |
This reverts commit f0bb8fa.
…to file-exclusion
file filter test cases
@debanjum @sabaimran let me know if there are any issues |
@debanjum added the case |
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.
Thanks for the working through the feedback! I've left some comments to fix the unit tests. Maybe a good idea to manually validate these changes locally and/or run the unit tests on your machine with pytest
. It'll speed up the review cycle
Sure, I'll be working on it. Thanks. |
@debanjum @sabaimran fixed the tests, Sorry for the delay. |
test_notes_search_with_only_filters failed, I'm not sure if it's related to this PR. |
Previously we were applying an "Or" filter, which would exclude any file mentioned in a query with multiple exclude file filter. This is not what we naturally mean when we ask excluding a file in a query
- Arrange tests in approximately simpler to complex order - Name tests for `can_filter' with `test_can_filter_' prefix - Name tests for `get_filter_terms' with `test_get_*' prefix - Add single file (include?) and exclude file filter tests
f76f66a
to
e85633a
Compare
Hey @srikary12, I've tested the PR and pushed some changes. These changes are good to merge!
The test failure was because of the changes made in this PR (Django ORM expected a |
Overview
Support exclude file filter in user search queries
Details
Example
journal.org
ordiary.org
and not intasks.org
and not inwork.md
Closes #728