Repository navigation
Release v7.1.0
This release targets the same 2026-07 API version as v7.0.0, and removes or renames nothing. The main addition is integrated embedding for document indexes: a document index's string fields can now be embedded by Pinecone, and you can search them with query text. This release also adds EgressBytes to the usage reported by data plane read operations.
go get github.com/pinecone-io/go-pinecone/v7/pineconeFeatures
Integrated embedding for document indexes
StringField has two new options, Embed and SparseEmbed. Pinecone embeds the field's text with a hosted model when you upsert or update documents. It embeds the query text of a search with the same model. Both configs are optional:
- An empty
EmbedConfig{}usesllama-text-embed-v2at its default dimension and metric. - An empty
SparseEmbedConfig{}usespinecone-sparse-english-v0.
You can override Model, Dimension, Metric, ReadParameters, and WriteParameters when you need to.
idx, err := pc.CreateIndex(ctx, &pinecone.CreateIndexRequest{
Name: "products",
Schema: pinecone.IndexSchema{
Fields: map[string]pinecone.IndexSchemaField{
"body": {String: &pinecone.StringField{Embed: &pinecone.EmbedConfig{}}},
"summary": {String: &pinecone.StringField{SparseEmbed: &pinecone.SparseEmbedConfig{}}},
},
},
})Upsert plain text, then search with an embed or sparse_embed scoring method:
upsertRes, err := idxConnection.UpsertDocuments(ctx, &pinecone.UpsertDocumentsRequest{
Documents: []pinecone.Document{
{"_id": "shoes", "body": "Lightweight trail running shoes with a grippy outsole.", "summary": "trail running shoes", "category": "footwear"},
{"_id": "tent", "body": "A two-person backpacking tent that pitches in minutes.", "summary": "backpacking tent", "category": "shelter"},
},
})
fmt.Println(upsertRes.Usage.EmbedTotalTokens)
query := "running shoes"
res, err := idxConnection.SearchDocuments(ctx, &pinecone.SearchDocumentsRequest{
TopK: 3,
ScoreBy: []pinecone.DocumentScoringMethod{
{Type: pinecone.DocumentScoringTypeEmbed, Fields: []string{"body"}, Query: &query},
},
IncludeFields: []string{"body"},
})Related additions:
StoreTextonStringFieldlets you embed a field's text and then discard it. Set it tofalsewhen a field is only used for similarity search, or to keep sensitive text out of Pinecone. A field without stored text can't use full-text search or$match_*filters, and you can't list it inIncludeFields.DocumentScoringType*constants cover all six scoring types:DenseVector,SparseVector,Text,QueryString,Embed, andSparseEmbed.DocumentScoringMethod.Typeis still astring, so existing code doesn't change.- An
embedorsparse_embedscoring method must be the only entry inScoreBy. You can only combine methods when every one istextorquery_string. - Embedding token usage:
UpsertDocumentsResponseandUpdateDocumentsResponsegain aUsage *DocumentWriteUsagethat reportsEmbedTotalTokens.DocumentUsage.EmbedTotalTokensreports the tokens embedded for a search query.
- When any field in an index's schema sets
EmbedorSparseEmbed, upsert and update requests are limited to 96 documents.
Indexes created with CreateIndexForModel are now called legacy integrated indexes in the docs. They still work, and you still use them through the legacy Records API (UpsertRecords, SearchRecords). For new work, use a document index with Embed or SparseEmbed. See Integrated embedding and Create a document index with integrated embedding.
Egress bytes on read operations
Read responses now report EgressBytes, the billed size of the response, next to ReadUnits:
| Type | Returned by | Field |
|---|---|---|
Usage |
Vector operations (query, fetch, list, ...) | EgressBytes *uint32 |
DocumentUsage |
Documents API reads | EgressBytes *int64 |
SearchUsage |
SearchRecords (legacy Records API) |
EgressBytes *int64 |
res, err := idxConnection.QueryByVectorValues(ctx, &pinecone.QueryByVectorValuesRequest{
Vector: queryVector,
TopK: 10,
})
if res.Usage != nil && res.Usage.EgressBytes != nil {
fmt.Printf("read units: %d, egress bytes: %d\n", res.Usage.ReadUnits, *res.Usage.EgressBytes)
}Other changes
- OnDemand read capacity for BYOC indexes. BYOC indexes now default to OnDemand read capacity, the same as serverless indexes. The SDK never blocked this, but the GoDoc and guides said some BYOC environments rejected it. Those caveats are gone, and the BYOC example in the indexes guide no longer sets Dedicated read capacity.
ConfigureIndexsends only the tags you pass. The client used to merge your tags into the index's existing tags before sending them. The server already merges tags by key, so the result is the same: keys you don't send are kept, and setting a key to""removes it.- Clearer
ConfigureIndexerror forEmbed. The error now points toSchemafor legacy integrated indexes, and toCreateIndexwithEmbedorSparseEmbedfor new indexes. - Integration tests are behind a build tag.
go test ./pineconenow runs only the unit tests and needs no credentials. Usego test -tags integration ./pineconeto also run the integration suites.
What's Changed
- Regenerate the
2026-07clients to pull in the latest spec changes (f47b505) by @austin-denoble - Add integrated embedding for document indexes:
EmbedConfig,SparseEmbedConfig,StoreText,DocumentWriteUsage, and theDocumentScoringType*constants (814d78a) by @austin-denoble - Reorganize the test suites, with table-driven wire tests and integration tests behind a build tag, and send only caller-provided tags in
ConfigureIndex(c26f6fa) by @austin-denoble - Use the integrated embedding and legacy integrated index terminology across GoDoc, the README, examples, and guides (2e48fe6) by @austin-denoble
- Expose
EgressByteson data plane read operations (d7d5576) by @austin-denoble - Support OnDemand read capacity for BYOC indexes, and pin
just gento the recordedapiscommit (4ae2901) by @austin-denoble - Fix prerelease tag handling in the
bump-versionandreleaseworkflows (319aff5) by @austin-denoble - Add
scripts/sync_to_public.sh, and limit thereleaseworkflow to the public repo (b3a9983) by @austin-denoble
Full Changelog: v7.0.0...v7.1.0