Type Alias SearchRecordsQuery

SearchRecordsQuery: {
    filter?: object;
    id?: string;
    inputs?: object;
    matchTerms?: SearchMatchTerms;
    topK: number;
    vector?: SearchRecordsVector;
}

The query object used with a SearchRecordsOptions request.

Type declaration

  • Optionalfilter?: object

    The filter to apply. You can use vector metadata to limit your search.

  • Optionalid?: string

    The unique ID of the vector to be used as a query vector.

  • Optionalinputs?: object

    The query text to search with. Searching with text is supported only for indexes with integrated embedding.

  • OptionalmatchTerms?: SearchMatchTerms

    Specifies which terms must be present in the text of each search hit based on the specified strategy. The match is performed against the text field specified in the integrated index fieldMap configuration. Terms are normalized and tokenized into single tokens before matching, and order does not matter. Expected format: {strategy: "all", terms: ["term1", "term2", "term3"]} Currently, only "all" strategy is supported, which means all specified terms must be present.

    Limitations: matchTerms is only supported for sparse indexes with integrated embedding configured to use the pinecone-sparse-english-v0 model.

  • topK: number

    The number of similar records to return.

  • Optionalvector?: SearchRecordsVector

    The SearchRecordsVector to search with, if provided.