Skip to content

Commit

Permalink
community[minor]: Revamp PGVector Filtering (langchain-ai#18992)
Browse files Browse the repository at this point in the history
This PR makes the following updates in the pgvector database:

1. Use JSONB field for metadata instead of JSON
2. Update operator syntax to include required `$` prefix before the
operators (otherwise there will be name collisions with fields)
3. The change is non-breaking, old functionality is still the default,
but it will emit a deprecation warning
4. Previous functionality has bugs associated with comparisons due to
casting to text (so lexical ordering is used incorrectly for numeric
fields)
5. Adds an a GIN index on the JSONB field for more efficient querying
  • Loading branch information
eyurtsev authored Mar 14, 2024
1 parent e276817 commit 6cdca43
Show file tree
Hide file tree
Showing 3 changed files with 851 additions and 45 deletions.
Loading

0 comments on commit 6cdca43

Please sign in to comment.