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

Feature/add document search back #1672

Merged
merged 10 commits into from
Dec 6, 2024
Merged

Conversation

emrgnt-cmplxty
Copy link
Contributor

@emrgnt-cmplxty emrgnt-cmplxty commented Dec 6, 2024

Important

Reintroduces document search functionality with new search endpoint, refactors for user-specific filters, and updates SDK and logging.

  • Behavior:
    • Reintroduces document search functionality with a new endpoint search_documents in documents_router.py.
    • Introduces select_search_filters function in search.py to handle user-specific search filters.
    • Updates search_documents method in retrieval_service.py to use select_search_filters.
  • Refactoring:
    • Refactors retrieval_router.py and documents_router.py to use select_search_filters.
    • Moves _select_filters logic to select_search_filters in search.py.
    • Updates RetrievalService and ManagementService to use new search logic.
  • SDK Changes:
    • Adds search method to DocumentsSDK in documents.py.
    • Updates RetrievalSDK in retrieval.py to support new search functionality.
  • Misc:
    • Fixes logging configuration in logging_config.py.
    • Updates database query logic in graph.py to handle new search filters.
    • Removes ingestion_router.py as part of cleanup.

This description was created by Ellipsis for 7995f6e. It will automatically update as commits are pushed.

@emrgnt-cmplxty emrgnt-cmplxty marked this pull request as ready for review December 6, 2024 23:47
@emrgnt-cmplxty emrgnt-cmplxty merged commit e4fba8c into main Dec 6, 2024
1 of 19 checks passed
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to 7995f6e in 1 minute and 28 seconds

More details
  • Looked at 1547 lines of code in 22 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. py/shared/abstractions/search.py:467
  • Draft comment:
    Consider adding a docstring to the select_search_filters function to explain its purpose and usage.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The PR introduces a new function select_search_filters in multiple files, replacing the previous _select_filters method. This function is used to apply user-specific filters to search settings. The function is defined in py/shared/abstractions/search.py and imported in various files. The function checks if the user is a superuser and applies collection filters accordingly. This change is consistent across the codebase, ensuring uniformity in how search filters are applied. The function is also added to the __all__ list in several __init__.py files, making it available for import. This change is a refactor to centralize the filter selection logic, which is a good practice for maintainability and consistency. However, the function could benefit from a docstring to explain its purpose and usage.

Workflow ID: wflow_Mo6CwO12V8iosDtE


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

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.

2 participants