test(fts): add integration tests for FTS data plane #597
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds comprehensive integration tests for the new FTS (Full-Text Search) data plane functionality:
text_query(), phrase matching with quoted strings, required terms (+term), boost and slop parameters, and$text_matchfilter operatorvector_query(), combined with metadata filtering andinclude_fieldsget()with defaults, iteration methods, andto_dict()query(),upsert(),fetch(), anddelete()methods continue to work with schema-based indexesAlso updates the
__init__.pyistub file to export new FTS types for proper mypy support:TextQuery,VectorQuery,Document,DocumentSearchResponsetext_query,vector_queryhelper functionsTextField,IntegerField, etc.) and deployment classesTest Plan
Related Issues
Made with Cursor
Note
Medium Risk
Adds a large suite of REST-only integration tests that create/delete real indexes and upsert/search data, which can be flaky or slow depending on environment and backend availability. Production library logic changes are limited to type-stub exports, so functional risk to SDK runtime is low.
Overview
Adds a new REST-sync integration test suite for FTS/schema-based indexes, including fixtures that create an index with a metadata schema, seed documents, and clean up via tagged deletion.
Covers
upsert_documents()andsearch_documents()for both text (TextQuery/text_query) and vector (VectorQuery/vector_query) scoring, plus filters (including$text_match) andinclude_fields; also validatesDocument/DocumentSearchResponseaccess patterns and verifies backwards compatibility of existingquery/upsert/fetch/delete/describe_index_statson schema-enabled indexes.Updates
pinecone/__init__.pyito export the new FTS query/document types and helper functions, and re-export schema field and deployment types for typing/mypy support.Written by Cursor Bugbot for commit bdcf685. This will update automatically on new commits. Configure here.