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

    Type Alias IntegratedEmbeddingStringField

    IntegratedEmbeddingStringField: StringField & (
        { embed: CreateEmbedConfig }
        | { sparseEmbed: CreateSparseEmbedConfig }
    )

    A string field with integrated embedding: Pinecone embeds the field's text with a hosted model when you upsert or update a document, and embeds the query text with the same model when a search scores the field with an embed or sparse_embed clause. You never handle the vectors yourself.

    Declare embed for a dense embedding, sparseEmbed for a sparse one, or both. Every key of either configuration is optional, so {} selects the default model. The configuration is fixed at creation, and the described index reports it resolved, with every omitted key filled in from the model.

    An index has one dense slot and one sparse slot: at most one field may be a dense_vector field or declare embed, and at most one may be a sparse_vector field or declare sparseEmbed.

    The field's text is stored by default, and stored text is always indexed for full-text search, so the described index reports fullTextSearch with default settings even when you declare only embed. Set storeText: false to embed the text without storing it. Such a field cannot also declare fullTextSearch, cannot be scored by text or query_string clauses or matched by $match_* filters, and cannot be returned: a fetch or search whose includeFields names it is rejected with a 400, and ['*'] leaves it out.

    Each value is at most 100 KB; when the text is stored, the full-text limit of 10,000 tokens per value also applies. An upsert or update request against an index with integrated embedding carries at most 96 documents.

    import type { IntegratedEmbeddingStringField } from '@pinecone-database/pinecone';

    const field: IntegratedEmbeddingStringField = {
    type: 'string',
    embed: { model: 'llama-text-embed-v2', dimension: 1024 },
    sparseEmbed: {},
    };

    Type Declaration