-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add filtering by tags for InMemoryDocumentStore #108
Conversation
… to support {many tags with many differnt values}. Adding unit tests
haystack/database/base.py
Outdated
@@ -38,9 +38,14 @@ class Document(BaseModel): | |||
question: Optional[str] = Field(None, description="Question text for FAQs.") | |||
query_score: Optional[float] = Field(None, description="Elasticsearch query score for a retrieved document") | |||
meta: Optional[Dict[str, Any]] = Field(None, description="") | |||
tags: Optional[Dict[str, Any]] = Field(None, description="Tags that allow filtering of the data") | |||
|
|||
def __getitem__(self, item): |
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.
Could we remove __get_item__()
altogether? I think we can access PyDantic properties directly, eg., document.text
and document.meta
.
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.
Removed
Thanks again @skirdey for the PR. It looks good-to-go! |
Storing and filtering tags in InMemory store. Adding meta obj to InMemory store.