-
Notifications
You must be signed in to change notification settings - Fork 51
refactor search suggestions #4105
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
Draft
jonbulz
wants to merge
45
commits into
develop
Choose a base branch
from
enhancement/refactor-search-suggestions
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
8b8fb33
refactor search suggestions
jonbulz 3baf289
define search fields in central place and handle foreign key relations
jonbulz a3c7c74
add search_fields description
jonbulz acb8718
ruff
jonbulz d358d6b
remove debugging console logs
jonbulz b31bf0d
update docstrings
jonbulz f76dc65
refactor get_model_cls_from_object_type
jonbulz a65047d
event search fields
jonbulz d5d823d
add location search fields
jonbulz 3a5ff5b
add page search fields
jonbulz d69a586
revert changes to existing endpoints, fix linters, update docstrings
jonbulz cb143c4
update docstring for suggest_tokens_for_model
jonbulz 8ff73e3
add tests for search-suggest
jonbulz aafd8a9
improve tests for search-suggest to check exact matches
jonbulz 61d8778
min query length
jonbulz 27a2d00
remove base matcher and add tests for TrigramMatcher
jonbulz a49b135
boost scores of tokens that start with query and add tests for scorer
jonbulz c86360d
move search_content_ajax to search module
jonbulz ed9aec3
handle JSON decode error gracefully and add comments
jonbulz 69efca1
search fields for user and organization
jonbulz 6ee4ee0
search fields for feedback, push notification and region
jonbulz d7eaffc
search fields for language
jonbulz f250f18
add missing URL path
jonbulz 0de4a2b
fix docstring to work with automatic documentation
jonbulz 17873bf
add region filtering
jonbulz fa78e7f
fix docstrings for real
jonbulz 3790ffe
move search and suggest logic to mixin
jonbulz 2e1bf9b
Merge remote-tracking branch 'origin/develop' into enhancement/refact…
jonbulz 03f83a5
remove dead search() and suggest() methods from mixin
jonbulz bfafe0b
add SearchSuggestMixin to Organization, Region, Language and User
jonbulz 3349b2e
exclude archived records from search suggest token extraction
jonbulz 7f76080
Merge remote-tracking branch 'origin/develop' into enhancement/refact…
jonbulz 4bcf5fb
assert that search suggestions exist when comparing lower and upperca…
jonbulz 3a45a17
use more specific query in test_search_suggestions_are_sorted_by_scor…
jonbulz 6975698
use search_suggest endpoint for MediaFile
jonbulz 489348f
add directories to media file search results
jonbulz c190203
lower default min similarity to 0.1
jonbulz 2282c4a
extract suggested search tokens from latest version only on translati…
jonbulz 2cde810
extract suggested search tokens from latest version only on pages
jonbulz a3c7867
move DIRECTORY_SEARCH_FIELDS to search_fields.py
jonbulz 45a410c
move classmethods to bottom in media_file.py
jonbulz f58f583
pass list of values instead of queryset as filtered relation for djan…
jonbulz f9ae2b5
Merge remote-tracking branch 'origin/develop' into enhancement/refact…
jonbulz 323203e
filter search suggestions by language
jonbulz 4b92431
force test ordering to avoid unique violation bugs after test db flush
jonbulz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This tightly couples the SearchSuggestMixin to the abstract_content_translation class. Maybe it would be better to inherit from the SearchSuggestMixing directly here in the AbstractContentTranslation class instead of the concrete child classes?