Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Adding filtering based on metadata using kwargs #682

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

Merged
merged 1 commit into from
Jun 4, 2023

Conversation

jsaied99
Copy link
Contributor

@jsaied99 jsaied99 commented Jun 4, 2023

Improving the vector search by adding filtering based on the additional kwargs. Adding from #663.

You can add additional metadata filters by passing them in the vector_search call. For example, if you want to filter by title:

results = collection.vector_search(query, top_k=5, title='Beyonce') or by page_number
results = collection.vector_search(query, top_k=5, page_number=13)

@jsaied99 jsaied99 marked this pull request as ready for review June 4, 2023 13:23
@jsaied99 jsaied99 changed the title Adding filtering based on metadata for using kwargs Adding filtering based on metadata using kwargs Jun 4, 2023
Copy link
Contributor

@montanalow montanalow left a comment

Choose a reason for hiding this comment

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

This adds flat single level filters, which I think is good enough to improve utility, and I think we can probably save further filtering operations and optimizations for follow ups, like GIN indexes.

@montanalow montanalow merged commit aa33b20 into postgresml:master Jun 4, 2023
SilasMarvin pushed a commit that referenced this pull request Oct 5, 2023
Co-authored-by: jas8dz <jsaied@mail.missouri.edu>
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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.