Skip to content

Release v7.1.0

Choose a tag to compare

@austin-denoble austin-denoble released this 20 Oct 18:28
· 6 commits to main since this release

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/pinecone

Features

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{} uses llama-text-embed-v2 at its default dimension and metric.
  • An empty SparseEmbedConfig{} uses pinecone-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:

  • StoreText on StringField lets you embed a field's text and then discard it. Set it to false when 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 in IncludeFields.
  • DocumentScoringType* constants cover all six scoring types: DenseVector, SparseVector, Text, QueryString, Embed, and SparseEmbed. DocumentScoringMethod.Type is still a string, so existing code doesn't change.
  • An embed or sparse_embed scoring method must be the only entry in ScoreBy. You can only combine methods when every one is text or query_string.
  • Embedding token usage:
    • UpsertDocumentsResponse and UpdateDocumentsResponse gain a Usage *DocumentWriteUsage that reports EmbedTotalTokens.
    • DocumentUsage.EmbedTotalTokens reports the tokens embedded for a search query.
  • When any field in an index's schema sets Embed or SparseEmbed, 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.
  • ConfigureIndex sends 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 ConfigureIndex error for Embed. The error now points to Schema for legacy integrated indexes, and to CreateIndex with Embed or SparseEmbed for new indexes.
  • Integration tests are behind a build tag. go test ./pinecone now runs only the unit tests and needs no credentials. Use go test -tags integration ./pinecone to also run the integration suites.

What's Changed

  • Regenerate the 2026-07 clients to pull in the latest spec changes (f47b505) by @austin-denoble
  • Add integrated embedding for document indexes: EmbedConfig, SparseEmbedConfig, StoreText, DocumentWriteUsage, and the DocumentScoringType* 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 EgressBytes on data plane read operations (d7d5576) by @austin-denoble
  • Support OnDemand read capacity for BYOC indexes, and pin just gen to the recorded apis commit (4ae2901) by @austin-denoble
  • Fix prerelease tag handling in the bump-version and release workflows (319aff5) by @austin-denoble
  • Add scripts/sync_to_public.sh, and limit the release workflow to the public repo (b3a9983) by @austin-denoble

Full Changelog: v7.0.0...v7.1.0