Create Text Index

Creates a text index.

The Create Text Index API allows you to create a text index, which you can use to add your own content to Haven OnDemand. You specify a name for the text index, which you can use to add data, and modify the index in future operations.

Note: Each text index flavor has a static resource unit cost, determined by the maximum index size and specialization. For more information about the resource unit costs for each flavor, see API and Resource Unit Consumption.

You use the index parameter to specify the name of your index. For example:

/1/api/[sync|async]/createtextindex/v1?index=myindex

The API returns a response to confirm that your index has been created, or to highlight any errors that occurred in the process, such as an existing index having the same name.

{
"message": "index created",
"index": "myindex"
}

The text indexes have a number of flavors, which define the configuration of your index. The flavors influence the maximum number of documents you can index, scaling, performance, and the number of available field types. For more information about flavors, see Index Flavors.

URL

Authentication

This API requires an authentication token to be supplied in the following parameter:

Parameter

Description

apikey

The API key to use to authenticate the API request.

Parameters

This API accepts the following parameters:

Required

Name

Type

Description

index

new_resource

The name of the index to create.

flavor

string

The configuration flavor of the text index. See Index Flavors.
Default value: explorer.

Optional

Name

Type

Description

description

string

A brief description of the index.

index_fields

array<string>

Custom fields that you want to define with the Index field type. Index fields contain document content, which receives linguistic processing for keyword and conceptual search. This parameter is relevant only for Standard, Custom Fields, Explorer and Jumbo flavors. See Index Field Types.

parametric_fields

array<string>

Custom fields that you want to define with the Parametric field type. Parametric fields contain values that you want to use for search filtering and exact matches. This parameter is relevant only for Standard, Categorization, Custom Fields, Explorer and Jumbo flavors. See Index Field Types.

expire_time

integer

The time in minutes until a document in the index becomes eligible for automatic expiry. This parameter is relevant only for Standard, Categorization, Custom Fields, Explorer and Jumbo flavors.

expire_date_fields

array<string>

Custom fields that you want to define with the Expire Date field type. Expire Date fields contain a date that you want to use to automatically expire the document. This parameter is relevant only for the Custom_Fields flavor. See Index Field Types.

numeric_fields

array<string>

Custom fields that you want to define with the Numeric field type. Numeric fields contain numeric values that you want to use for searches. This parameter is relevant only for the Custom_Fields flavor. See Index Field Types.

display_name

string

A friendly name for the index.

This API returns a JSON response that is described by the model below. This single model is presented both as an easy to read abstract definition and as the formal JSON schema.

Haven OnDemand uses cookies to enhance and improve the experience it provides. By continuing to use this site or pressing Continue,
we will assume that you accept receiving all cookies. If you would like to change which cookies are set, you can change your settings.