Skip to content

docs: document metadata filter operators on v2 search methods - #320

Open
Can Şahin (Cnashn) wants to merge 1 commit into
langchain-ai:mainfrom
Cnashn:docs/document-metadata-filter-operators
Open

docs: document metadata filter operators on v2 search methods#320
Can Şahin (Cnashn) wants to merge 1 commit into
langchain-ai:mainfrom
Cnashn:docs/document-metadata-filter-operators

Conversation

@Cnashn

Copy link
Copy Markdown

Summary

The filter parameter on the v2 AsyncPGVectorStore search methods accepts a rich metadata filter DSL ($eq, $ne, $gt, $gte, $lt, $lte, $in, $nin, $between, $exists, $like, $ilike, $and, $or, $not, plus nested a.b paths), but the method docstrings were one-line summaries that never mentioned filter or the supported operators. Users end up guessing the syntax and running into surprises (e.g. #276, #304).

This documents it:

  • asimilarity_search gets a full Args/Returns docstring listing every supported operator with a short example.
  • asimilarity_search_with_score gets a concise Args block that references asimilarity_search for the filter syntax.

Notes

Checks

  • ruff format --diff and ruff check pass
  • mypy passes
  • tests/unit_tests/v2/test_async_pg_vectorstore_search.py: 159 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.

1 participant