-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat(orpd-54): significant backend improvements #48
Merged
Conversation
This file contains 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
Replaced identifier encoding with UUID generation for document IDs to ensure uniqueness and simplify implementation. Removed redundant URL decoding logic from views.py. Added a new utility function to generate short UUIDs.
…-react' into feature/orpd-54-search-terms
Enhanced the filtering mechanism to handle document types case-insensitively by converting them to lowercase. Introduced a new filter to limit search results based on publisher names when provided in the configuration.
Replaced the previous external `PublicGateway` search implementation with an internal database search using `search_database`. This change improves performance and consistency by leveraging Django's ORM for querying documents.
Simplify the process of extracting the 'id' parameter from the request and updating the error handling for missing ids. This refactoring also removes redundant return statements by consolidating them into a single point of exit.
Deleted the initial migration script and updated `date_valid` to store text instead of date. Added `sort_date` to better handle date validations and modified the publisher retrieval to improve error handling and logging.
This commit introduces the initial migration for the orp_search app, creating the DataResponseModel with various fields. These fields support metadata attributes such as title, identifier, publisher, and many others, including relationships and score.
Ensure document types from user input are normalized to lower case for consistency. Improved the filtering logic in search results to support case-insensitive matches by using more efficient Q objects, and changed request parameter processing to handle multiple document types correctly.
Convert publisher names to lowercase for consistency in config and improve search query handling by adding condition checks and incorporating more detailed Q object logic. These changes ensure case-insensitive comparison for publishers and handle empty query objects more effectively.
Added a log statement for `publisher_names` in the `config.py` to track incoming request data. Fixed an issue in `search.py` where the publisher filter was incorrectly using `type__icontains` instead of `publisher__icontains`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.