For general-purpose text retrieval, we recommend full-text search: it runs over your raw
text fields with BM25 ranking and Lucene query syntax.pinecone-sparse-english-v0 is the right choice for workflows that need a learned sparse-vector representation — for example, when your application already produces sparse vectors upstream of Pinecone, or when you’re pairing it with a dense encoder in a single-index hybrid workflow on the Vectors API.You can call the Generate vectors operation for standalone embedding to turn text into vectors without writing to an index. That differs from integrated embedding on a document index, where Pinecone embeds a field’s text when you upsert or search. To see how many embedding tokens a request consumes, see Embedding tokens.input_type as either query or passage. Optionally, you can:- Return the string tokens using
"return_tokens": true. - Raise the max input tokens limit from the default of
512to the maximum of2048using"max_tokens_per_sequence": 2048. - Return an error when the input exceeds
max_tokens_per_sequenceusing"truncate": "NONE".
input_type to passage for writes and query for reads by default.Installation
Integrated embedding on document indexes requires Python SDK10.1.0 or later, or Node.js SDK 9.1.0 or later.Create index
This creates a document index whosechunk_text field embeds with pinecone-sparse-english-v0. The write_parameters and read_parameters raise the max input tokens from 512 to 2,048 for upserts and queries.Embed & upsert
Upsert documents with plain text on the embedded field. Pinecone embeds each value on write, up to 96 documents per request.Query
Search with asparse_embed clause. Pinecone embeds the query text with the field’s model and returns the documents that share the most important terms with it.