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

refactor: Add support for new filters declaration #6397

Merged
merged 12 commits into from
Nov 24, 2023
Merged

Conversation

silvanocerza
Copy link
Contributor

@silvanocerza silvanocerza commented Nov 23, 2023

Proposed Changes:

This PR changes MetadataRouter and InMemoryDocumentStore to support new filters as defined in proposal #6001.

I also updated the DocumentStore protocol docstring to reflect the support of new filters.

How did you test it?

I added new tests and update the ones failing cause of the behaviour change.

Notes for the reviewer

InMemoryDocumentStore still uses legacy filters converted to new ones in tests as I'll add tests for new filters in testing/document_store.py in a later PR.

Checklist

@silvanocerza silvanocerza added the 2.x Related to Haystack v2.0 label Nov 23, 2023
@silvanocerza silvanocerza self-assigned this Nov 23, 2023
@silvanocerza silvanocerza requested review from a team as code owners November 23, 2023 12:03
@silvanocerza silvanocerza requested review from dfokina and masci and removed request for a team November 23, 2023 12:03
@github-actions github-actions bot added topic:tests type:documentation Improvements on the docs labels Nov 23, 2023
Copy link
Contributor

@masci masci left a comment

Choose a reason for hiding this comment

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

Before I go into filters.py, I left a question around docstrings so you can think about it in the meantime

haystack/preview/document_stores/protocols.py Outdated Show resolved Hide resolved
haystack/preview/document_stores/protocols.py Outdated Show resolved Hide resolved
haystack/preview/document_stores/protocols.py Outdated Show resolved Hide resolved
haystack/preview/document_stores/protocols.py Outdated Show resolved Hide resolved
haystack/preview/document_stores/protocols.py Outdated Show resolved Hide resolved
Copy link
Contributor

@masci masci left a comment

Choose a reason for hiding this comment

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

Almost good to go!

test/preview/utils/test_filters.py Show resolved Hide resolved
haystack/preview/document_stores/protocols.py Outdated Show resolved Hide resolved
haystack/preview/utils/filters.py Outdated Show resolved Hide resolved
@silvanocerza silvanocerza merged commit fd16ec6 into main Nov 24, 2023
23 checks passed
@silvanocerza silvanocerza deleted the rework-filters branch November 24, 2023 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Related to Haystack v2.0 topic:tests type:documentation Improvements on the docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants