Files
langchain/langchain
Eugene Yurtsev 0ff59569dc Adds 'IN' metadata filter for pgvector for checking set presence (#4982)
# Adds "IN" metadata filter for pgvector to all checking for set
presence

PGVector currently supports metadata filters of the form:
```
{"filter": {"key": "value"}}
```
which will return documents where the "key" metadata field is equal to
"value".

This PR adds support for metadata filters of the form:
```
{"filter": {"key": { "IN" : ["list", "of", "values"]}}}
```

Other vector stores support this via an "$in" syntax. I chose to use
"IN" to match postgres' syntax, though happy to switch.
Tested locally with PGVector and ChatVectorDBChain.


@dev2049

---------

Co-authored-by: jade@spanninglabs.com <jade@spanninglabs.com>
2023-05-19 13:53:23 -07:00
..
2023-05-19 11:17:10 -04:00
2023-05-17 22:50:35 +00:00
2023-05-17 14:09:25 +00:00
2023-05-18 09:56:51 -04:00
2023-05-18 09:27:09 -07:00
2023-05-17 01:28:43 +00:00
2023-05-18 09:12:23 -07:00
2023-05-15 15:38:49 +00:00
2023-05-17 22:50:35 +00:00
2023-04-24 19:54:15 -07:00
2023-05-16 13:26:43 +00:00
2023-05-14 10:29:17 -07:00