mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 15:38:55 +01:00
05c0aa3882
### Overview Support exclude file filter in user search queries ### Details - All of the exclude file filter terms need to be satisfied - Any one of the include file filter terms should be satisfied ### Example - **Search Query**: *what happened yesterday? -file:"tasks.org" -file:"work.md" file:"diary.org" file:"journal.org* - **Behavior**: Query will try find relevant notes in any of `journal.org` or `diary.org` and not in `tasks.org` and not in `work.md` ### Details * Add support for exclusion file filters * Translate file filter to valid Django DB entry filter regex * Exclude all files when multiple exclude file filter in query 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 * Rename, rearrange, deduplicate and add file filter tests Closes #728 --------- Co-authored-by: Debanjum Singh Solanky <debanjum@gmail.com> |
||
---|---|---|
.. | ||
data | ||
__init__.py | ||
conftest.py | ||
helpers.py | ||
test_cli.py | ||
test_client.py | ||
test_conversation_utils.py | ||
test_date_filter.py | ||
test_db_lock.py | ||
test_docx_to_entries.py | ||
test_file_filter.py | ||
test_helpers.py | ||
test_image_to_entries.py | ||
test_markdown_to_entries.py | ||
test_multiple_users.py | ||
test_offline_chat_actors.py | ||
test_offline_chat_director.py | ||
test_openai_chat_actors.py | ||
test_openai_chat_director.py | ||
test_org_to_entries.py | ||
test_orgnode.py | ||
test_pdf_to_entries.py | ||
test_plaintext_to_entries.py | ||
test_text_search.py | ||
test_word_filter.py |