Package version:

Interface SemanticSearchOptions

Defines options for semantic search queries

interface SemanticSearchOptions {
    answers?: ExtractiveQueryAnswer;
    captions?: ExtractiveQueryCaption;
    configurationName?: string;
    errorMode?: "partial" | "fail";
    maxWaitInMilliseconds?: number;
    semanticQuery?: string;
}

Properties

If set, the query returns answers extracted from key passages in the highest ranked documents.

If set, the query returns captions extracted from key passages in the highest ranked documents. When Captions is set to 'extractive', highlighting is enabled by default. Defaults to 'None'.

configurationName?: string

The name of a semantic configuration that will be used when processing documents for queries of type semantic.

errorMode?: "partial" | "fail"

Allows the user to choose whether a semantic call should fail completely, or to return partial results (default).

maxWaitInMilliseconds?: number

Allows the user to set an upper bound on the amount of time it takes for semantic enrichment to finish processing before the request fails.

semanticQuery?: string

Allows setting a separate search query that will be solely used for semantic reranking, semantic captions and semantic answers. Is useful for scenarios where there is a need to use different queries between the base retrieval and ranking phase, and the L2 semantic phase.