- Documents: JSON records whose fields you declare in a schema at creation. A document index is the default, and it can combine dense vector, sparse vector, and full-text (
string) fields in one record, so a single index serves full-text search, semantic search, and sparse-vector search. - Dense vectors: Numerical representations of the meaning of text, images, or other data. A vector index of dense vectors serves semantic search, or hybrid search together with sparse vectors.
- Sparse vectors: High-dimensional vectors with mostly zero values that capture keyword signals, produced by a sparse embedding model such as
pinecone-sparse-english-v0. A vector index of sparse vectors serves sparse-vector search, or hybrid search together with dense vectors.
Create a document index
An index with a document schema stores typed JSON documents. The schema declares how each ranking field is indexed: as astring field with full_text_search enabled for BM25 ranking, a dense_vector for ANN similarity, or a sparse_vector. A single index can mix all three ranking field types, and at query time you pick the ranking signal with score_by. Any other fields you upsert are stored as metadata, auto-indexed for filtering at upsert time.
Full-text search and integrated embedding are different features. A
string field with full_text_search is indexed for BM25 keyword ranking and Lucene queries. It doesn’t create vectors or call an embedding model. To have Pinecone turn a field’s text into vectors, use integrated embedding: declare embed or sparse_embed on a string field in a document index. The legacy create_index_for_model path does this too, creating a legacy integrated index served by the Records API.2026-07, supported through REST and the Python (v10 or later), Node.js (v9 or later), and Go (v7 or later) SDKs. For other languages, call the REST endpoint directly.
Minimal: BM25 on a single text field
The example below creates anarticles index whose body field is indexed for BM25 ranking. Other fields included at upsert time are stored on each document and auto-indexed for filtering as metadata.
Multi-field schema: BM25 + dense vector
A single index with a document schema can hold FTS-enabledstring and dense_vector ranking fields together, and the same schema can also include a sparse_vector field. A single search request ranks by one scoring type. Multi-field BM25 is supported: use multiple text clauses on different fields, or one query_string clause spanning fields. Any scoring method can be combined with metadata filters, including text-match filters ($match_phrase, $match_all, $match_any) on FTS-enabled string fields.
category or year) at upsert time. All metadata fields are automatically indexed for filtering — they don’t need to be declared in the schema. The schema is for ranking fields only. string_list, float, and boolean fields are always metadata, and a string field is metadata unless it sets full_text_search, embed, or sparse_embed. Declaring a metadata-only field in the schema is rejected at index creation. To index only the metadata fields you filter on, see Configure metadata indexing.
Integrated embedding
On a document index, declareembed or sparse_embed on a string field. Pinecone then embeds its text on write and the query text at search time, so you upsert and search with plain text instead of vectors. See Integrated embedding for the schema, examples, and limits.
For the full schema reference (all field types, language and analyzer options, dedicated read capacity, and Python SDK examples), see Full-text search.
Create a vector index
A vector index stores dense or sparse vectors and is read and written through the Vectors API. (A document index can also holddense_vector and sparse_vector fields; see Create a document index.)
Dense vectors
You can create an index that stores dense vectors with integrated vector embedding, or one that stores vectors generated with an external embedding model.Integrated embedding (legacy)
This creates a legacy integrated index served by the Records API. To embed text in a document index instead, see Integrated embedding.
If you want to upsert and search with source text and have Pinecone convert it to dense vectors automatically, create an index with integrated embedding as follows:
- Provide a
namefor the index. - Set
cloudandregionto the cloud and region where the index should be deployed. - Set
embed.modelto one of Pinecone’s hosted embedding models. - Set
embed.field_mapto the name of the field in your source document that contains the data for embedding.
Bring your own vectors
If you use an external embedding model to convert your data to dense vectors, create an index as follows:- Provide a
namefor the index. - Set the
vector_typetodense. - Specify the
dimensionand similaritymetricof the vectors you’ll store in the index. This should match the dimension and metric supported by your embedding model. - Set
spec.cloudandspec.regionto the cloud and region where the index should be deployed. For Python, you also need to import theServerlessSpecclass.
Sparse vectors
You can create an index that stores sparse vectors with integrated vector embedding, or one that stores vectors generated with an external embedding model.Integrated embedding (legacy)
This creates a legacy integrated index served by the Records API. To embed text in a document index instead, see Integrated embedding. If you want to upsert and search with source text and have Pinecone convert it to sparse vectors automatically, create an index with integrated embedding as follows:- Provide a
namefor the index. - Set
cloudandregionto the cloud and region where the index should be deployed. - Set
embed.modelto one of Pinecone’s hosted sparse embedding models. - Set
embed.field_mapto the name of the field in your source document that contains the text for embedding. - If needed,
embed.read_parametersandembed.write_parameterscan be used to override the default model embedding behavior.
Bring your own vectors
If you use an external embedding model to convert your data to sparse vectors, create an index as follows:- Provide a
namefor the index. - Set the
vector_typetosparse. - Set the distance
metrictodotproduct. Indexes that store sparse vectors don’t support other distance metrics. - Set
spec.cloudandspec.regionto the cloud and region where the index should be deployed.
Create an index from a backup
You can restore an index from a backup, regardless of whether it stores dense or sparse vectors. For more details, see Restore an index.Wait for the index to be ready
A new index of any type can’t accept data until itsstatus.ready field is true. The Python SDK waits for this by default, and the Node.js SDK waits when you pass waitUntilReady: true. If you call the API directly, describe the index repeatedly until status.ready is true, then upsert.