-
Couldn't load subscription status.
- Fork 102
Feature: Add Document Retrieval with Metadata Filtering #231
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
base: main
Are you sure you want to change the base?
Feature: Add Document Retrieval with Metadata Filtering #231
Conversation
|
@cedrickrusche Thank you for opening this PR! I've left a couple of comments |
|
@dishaprakash Thank you for commenting but I can not see the comments |
| results = result_map.fetchall() | ||
| return bool(len(results) == 1) | ||
|
|
||
| async def aget( |
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.
Please add a synchronous function get which returns an error, similar to these.
| k: Optional[int] = None, | ||
| **kwargs: Any, | ||
| ) -> list[Document]: | ||
|
|
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.
Please add a docstring to this function
|
@cedrickrusche sorry about the confusion, is it visible now? |

This pull request introduces the methods get and aget like in ChromaDB to retrieve data by metadata.
🔧 Changes
agetmethod to asynchronously retrieve documents based on optional filters and parameters.getmethod for synchronous document retrieval, leveraging the asynchronousagetmethod.__query_collection_with_filtermethod to support filtering conditions in the SQL WHERE clause without similarity function📈 Impact
These changes let us retrieve the current content to get insights about the data in the database e.g. to find outdated content.