Pinecone TypeScript SDK - v9.0.0
    Preparing search index...

    Interface IndexSchema

    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);
    }
    interface IndexSchema {
        fields: { [fieldName: string]: IndexSchemaField };
    }

    Hierarchy

    • Omit<GeneratedIndexSchema, "fields">
      • IndexSchema
    Index
    fields: { [fieldName: string]: IndexSchemaField }

    Map of field names to their schema configurations.