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

Fix/metadata filtering #30

Merged
merged 8 commits into from
Feb 1, 2024
Merged

Fix/metadata filtering #30

merged 8 commits into from
Feb 1, 2024

Conversation

amindadgar
Copy link
Member

No description provided.

- We can now fetch similar nodes by manually doing metadata filterings on database!
- Because the PGVectorStore didn't support combination of `AND` and `OR` conditions we needed to do it manually and now other parts had to change too!
- Still I haven't didn't test the whole process in subquery generator.
@amindadgar amindadgar linked an issue Feb 1, 2024 that may be closed by this pull request
query_engine = self.engine.prepare_platform_engine(
# the output should always have a `date` key for each dictionary
filters = [
{"channel": "general", "date": "2023-01-02"},

Choose a reason for hiding this comment

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

Do we have test cases where multiple channels/threads/dates are provided?

Copy link
Member Author

Choose a reason for hiding this comment

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

This file contains test cases for applying multiple OR between each item of the filters list and two or one AND operation between each item of the list (each dictionaries). Adding a thread to it, is no different as it would add three AND operator instead of two for date and channel.

@amindadgar amindadgar merged commit 7e6345b into main Feb 1, 2024
16 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.

Bug: Wrong metadata filter
2 participants