Interface SearchQueryOptions

interface SearchQueryOptions {
    collections?: string[];
    consistency?: NotBounded;
    consistentWith?: MutationState;
    disableScoring?: boolean;
    explain?: boolean;
    facets?: {
        [name: string]: SearchFacet;
    };
    fields?: string[];
    highlight?: {
        fields?: string[];
        style?: HighlightStyle;
    };
    includeLocations?: boolean;
    limit?: number;
    logRequest?: boolean;
    logResponse?: boolean;
    raw?: {
        [key: string]: any;
    };
    showRequest?: boolean;
    skip?: number;
    sort?: string[] | SearchSort[];
    timeout?: number;
}

Properties

collections?: string[]

Specifies the collections which should be searched as part of the query.

consistency?: NotBounded

Specifies the consistency requirements when executing the query.

See

SearchScanConsistency

consistentWith?: MutationState

Specifies a MutationState which the query should be consistent with.

disableScoring?: boolean

Specifies that scoring should be disabled. This improves performance but makes it impossible to sort based on how well a particular result scored.

explain?: boolean

Configures whether the result should contain the execution plan for the query.

facets?: {
    [name: string]: SearchFacet;
}

Specifies any facets that should be included in the query.

Type declaration

fields?: string[]

Specifies the list of fields which should be searched.

highlight?: {
    fields?: string[];
    style?: HighlightStyle;
}

Specifies how the highlighting should behave. Specifically which mode should be used for highlighting as well as which fields should be highlighted.

Type declaration

includeLocations?: boolean

If set to true, will include the locations in the search result.

This API is subject to change without notice.

limit?: number

Specifies the limit to the number of results that should be returned.

logRequest?: boolean

Uncommitted: This API is subject to change in the future. Specifies that the search request should appear in the log.

logResponse?: boolean

Uncommitted: This API is subject to change in the future. Specifies that the search response should appear in the log.

raw?: {
    [key: string]: any;
}

Specifies any additional parameters which should be passed to the query engine when executing the query.

Type declaration

  • [key: string]: any
showRequest?: boolean

Specifies that the search response should include the request JSON.

skip?: number

Specifies the number of results to skip from the index before returning results.

sort?: string[] | SearchSort[]

Specifies a list of fields or SearchSort's to use when sorting the result sets.

timeout?: number

The timeout for this operation, represented in milliseconds.