Skip to content
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
merged 11 commits into from
Nov 20, 2024

Conversation

hareshkainthdbt
Copy link
Collaborator

No description provided.

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.
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`.
@hareshkainthdbt hareshkainthdbt merged commit 2a0488d into main Nov 20, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant