The schema of an existing index: a map of field names to their configurations.
import { Pinecone } from '@pinecone-database/pinecone';const pc = new Pinecone();const index = await pc.indexes.describe('product-catalog');const field = index.schema.fields['embedding'];if (field && 'type' in field && field.type === 'dense_vector') { console.log(field.dimension, field.metric);} Copy
import { Pinecone } from '@pinecone-database/pinecone';const pc = new Pinecone();const index = await pc.indexes.describe('product-catalog');const field = index.schema.fields['embedding'];if (field && 'type' in field && field.type === 'dense_vector') { console.log(field.dimension, field.metric);}
Map of field names to their schema configurations.
The schema of an existing index: a map of field names to their configurations.