Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

metadata and generic filters in vector search#689

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
santiatpml merged 1 commit intomasterfromsanti-pgml-sdk-metadata-filter
Jun 6, 2023

Conversation

@santiatpml
Copy link
Contributor

I have added two filters to vector_search:metadata_filter uses basic containment operator@> andgeneric_filter takes pretty much anything that the user wants to filter ondocuments table using SQL syntax.

generic_filter should give us quite a bit of coverage including timestamps and nested metadata.

Added three tests.

Copy link
Contributor

@montanalowmontanalow left a comment

Choose a reason for hiding this comment

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

I think there is a quickly growing need to move to a builder pattern, to prevent having to duplicate this functionality for example on a text_search or fuzzy_search function. We need a better API that more cleanly encapsulates recall, ranking and filtering, reranking and refiltering, and finally passing as an input to another SQL function or recalling from the database to the application.

santiatpml reacted with thumbs up emoji

ifmetadata_filter:
cte_select_statement+= (
" AND documents.metadata @> {metadata_filter}".format(
Copy link
Contributor

Choose a reason for hiding this comment

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

This is nice. We should also add a GIN index todocuments.metadata.

santiatpml reacted with thumbs up emoji
@santiatpmlsantiatpml merged commit873ca9b intomasterJun 6, 2023
@santiatpmlsantiatpml deleted the santi-pgml-sdk-metadata-filter branchJune 6, 2023 00:16
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@montanalowmontanalowmontanalow approved these changes

@levkklevkkAwaiting requested review from levkk

@SilasMarvinSilasMarvinAwaiting requested review from SilasMarvin

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@santiatpml@montanalow@santiadavani

[8]ページ先頭

©2009-2025 Movatter.jp