Skip to main content
A Pinecone index can hold any combination of the following:
  • Documents are the unit of data in an index with a document schema — JSON records whose ranking fields are indexed according to a schema you declare at index creation. An index with a document schema can mix dense_vector, sparse_vector, and FTS-enabled string ranking fields in the same record, alongside any number of metadata fields (auto-indexed at upsert time). Use documents for full-text search (BM25 ranking on string fields with full_text_search enabled), and to combine multiple scoring methods on the same data via score_by.
  • Dense vectors are numerical representations of the meaning and relationships of text, images, or other data. Indexes of dense vectors are used for semantic search, or together with sparse vectors for hybrid search.
  • Sparse vectors are high-dimensional vectors with mostly zero values, produced by a sparse embedding model such as pinecone-sparse-english-v0. Indexes of sparse vectors are used for sparse-vector search, or together with dense vectors for hybrid search.
You can create an index using the Pinecone console.
For index naming rules, available cloud regions, similarity metrics, and hosted embedding models, see Index configuration. An index with a document schema stores typed JSON documents. The schema declares how each ranking field is indexed: as a string 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; at query time, pick the ranking signal with score_by. Metadata fields (anything else you upsert) aren’t declared in the schema — they’re auto-indexed for filtering at upsert time.
Full-text search isn’t integrated embedding. A string field with full_text_search is indexed for BM25 ranking and Lucene queries. It doesn’t call an embedding model. Integrated embedding remains available for vector indexes.
Indexes with document schemas use API version 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 an articles 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-enabled string and dense_vector ranking fields together (the same schema can also include a sparse_vector field). A single search request ranks by one scoring type — multi-field BM25 is supported (multiple text clauses on different fields, or one query_string clause spanning fields), and any scoring method can be combined with metadata filters, including text-match filters ($match_phrase, $match_all, $match_any) on FTS-enabled string fields.
You can include additional fields (for example, 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; declaring a metadata-only field (string without full_text_search, string_list, float, or boolean) is rejected at index creation. To index only the metadata fields you filter on, see Configure metadata indexing. For the full schema reference (all field types, language and analyzer options, dedicated read capacity, and Python SDK examples), see Full-text search.
Schema migration is not yet supported. Once an index with a document schema is created, you can’t add, remove, or modify fields. Plan your schema carefully — if you need to change a schema, delete the index and create a new one.

Create an index for 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

Indexes with integrated embedding don’t support updating or importing with text.
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 name for the index.
  • Set cloud and region to the cloud and region where the index should be deployed.
  • Set embed.model to one of Pinecone’s hosted embedding models.
  • Set embed.field_map to the name of the field in your source document that contains the data for embedding.
Other parameters are optional. See the API reference for details.

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 name for the index.
  • Set the vector_type to dense.
  • Specify the dimension and similarity metric of the vectors you’ll store in the index. This should match the dimension and metric supported by your embedding model.
  • Set spec.cloud and spec.region to the cloud and region where the index should be deployed. For Python, you also need to import the ServerlessSpec class.
Other parameters are optional. See the API reference for details.

Create an index for 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

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 name for the index.
  • Set cloud and region to the cloud and region where the index should be deployed.
  • Set embed.model to one of Pinecone’s hosted sparse embedding models.
  • Set embed.field_map to the name of the field in your source document that contains the text for embedding.
  • If needed, embed.read_parameters and embed.write_parameters can be used to override the default model embedding behavior.
Other parameters are optional. See the API reference for details.

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 name for the index.
  • Set the vector_type to sparse.
  • Set the distance metric to dotproduct. Indexes that store sparse vectors don’t support other distance metrics.
  • Set spec.cloud and spec.region to the cloud and region where the index should be deployed.
Other parameters are optional. See the API reference for details.

Wait for the index to be ready

A new index of any type can’t accept data until its status.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.

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.