Parameters for the postSearch operation.

interface PostSearchParams {
    bookmark?: string;
    counts?: string[];
    db: string;
    ddoc: string;
    drilldown?: string[][];
    groupField?: string;
    groupLimit?: number;
    groupSort?: string[];
    headers?: OutgoingHttpHeaders;
    highlightFields?: string[];
    highlightNumber?: number;
    highlightPostTag?: string;
    highlightPreTag?: string;
    highlightSize?: number;
    includeDocs?: boolean;
    includeFields?: string[];
    index: string;
    limit?: number;
    query: string;
    ranges?: JsonObject;
    sort?: string[];
    stale?: string;
}

Properties

bookmark?: string

Opaque bookmark token used when paginating results.

counts?: string[]

This field defines an array of names of string fields, for which counts are requested. The response contains counts for each unique value of this field name among the documents that match the search query. Faceting must be enabled for this parameter to function. This option is only available when making global queries.

db: string

Path parameter to specify the database name.

ddoc: string

Path parameter to specify the design document name. The design document name is the design document ID excluding the _design/ prefix.

drilldown?: string[][]

Restrict results to documents with a dimension equal to the specified label(s). The search matches only documents containing the value that was provided in the named field. It differs from using "fieldname:value" in the q parameter only in that the values are not analyzed. Faceting must be enabled for this parameter to function.

groupField?: string

Field by which to group search matches. A string that contains the name of a string field. Fields containing other data such as numbers, objects, or arrays cannot be used. This option is only available when making global queries.

groupLimit?: number

Maximum group count. This field can be used only if group_field is specified. This option is only available when making global queries.

groupSort?: string[]

This field defines the order of the groups in a search that uses group_field. The default sort order is relevance. This field can have the same values as the sort field, so single fields and arrays of fields are supported. This option is only available when making global queries.

headers?: OutgoingHttpHeaders
highlightFields?: string[]

Specifies which fields to highlight. If specified, the result object contains a highlights field with an entry for each specified field.

highlightNumber?: number

Number of fragments that are returned in highlights. If the search term occurs less often than the number of fragments that are specified, longer fragments are returned.

highlightPostTag?: string

A string that is inserted after the highlighted word in the highlights output.

highlightPreTag?: string

A string that is inserted before the highlighted word in the highlights output.

highlightSize?: number

Number of characters in each fragment for highlights.

includeDocs?: boolean

Include the full content of the documents in the return.

includeFields?: string[]

A JSON array of field names to include in search results. Any fields that are included must be indexed with the store:true option. The default is all fields.

index: string

Path parameter to specify the index name.

limit?: number

Limit the number of the returned documents to the specified number.

query: string

The Lucene query to execute.

ranges?: JsonObject

This field defines ranges for faceted, numeric search fields. The value is a JSON object where the fields names are faceted numeric search fields, and the values of the fields are JSON objects. The field names of the JSON objects are names for ranges. The values are strings that describe the range, for example "[0 TO 10]". This option is only available when making global queries.

sort?: string[]

Specifies the sort order of the results. In a grouped search (when group_field is used), this parameter specifies the sort order within a group. The default sort order is relevance. A JSON string of the form "fieldname<type>" or "-fieldname<type>" for descending order, where fieldname is the name of a string or number field, and type is either a number, a string, or a JSON array of strings. The type part is optional, and defaults to number. Some examples are "foo", "-foo", "bar<string>", "-foo<number>" and ["-foo<number>", "bar<string>"]. String fields that are used for sorting must not be analyzed fields. Fields that are used for sorting must be indexed by the same indexer that is used for the search query.

stale?: string

Do not wait for the index to finish building to return results.

Generated using TypeDoc