younifyd
Menu

Indexes Create

Creates a new search index.

POST/indexes

Use it in a workflow

  1. Add a step and choose the Azure AI Search connector.
  2. Pick the Indexes Create action (under Service).
  3. Fill in the fields below, then reference the result from later steps as {{indexesCreate.response.data}}.

Request

Request body

Enter the body as JSON in the step's Body field.

namestringrequired

The name of the index.

descriptionstring

The description of the index.

fieldsarray<object>required

The fields of the index.

namestringrequired

The name of the field, which must be unique within the fields collection of the index or parent field.

typestringrequired

Defines the data type of a field in a search index.

One ofEdm.StringEdm.Int32Edm.Int64Edm.DoubleEdm.BooleanEdm.DateTimeOffsetEdm.GeographyPointEdm.ComplexTypeEdm.SingleEdm.HalfEdm.Int16Edm.SByteEdm.Byte

keyboolean

A value indicating whether the field uniquely identifies documents in the index. Exactly one top-level field in each index must be chosen as the key field and it must be of type Edm.String. Key fields can be used to look up documents directly and update or delete specific documents. Default is false for simple fields and null for complex fields.

retrievableboolean

A value indicating whether the field can be returned in a search result. You can disable this option if you want to use a field (for example, margin) as a filter, sorting, or scoring mechanism but do not want the field to be visible to the end user. This property must be true for key fields, and it must be null for complex fields. This property can be changed on existing fields. Enabling this property does not cause any increase in index storage requirements. Default is true for simple fields, false for vector fields, and null for complex fields.

storedboolean

An immutable value indicating whether the field will be persisted separately on disk to be returned in a search result. You can disable this option if you don't plan to return the field contents in a search response to save on storage overhead. This can only be set during index creation and only for vector fields. This property cannot be changed for existing fields or set as false for new fields. If this property is set as false, the property 'retrievable' must also be set to false. This property must be true or unset for key fields, for new fields, and for non-vector fields, and it must be null for complex fields. Disabling this property will reduce index storage requirements. The default is true for vector fields.

searchableboolean

A value indicating whether the field is full-text searchable. This means it will undergo analysis such as word-breaking during indexing. If you set a searchable field to a value like "sunny day", internally it will be split into the individual tokens "sunny" and "day". This enables full-text searches for these terms. Fields of type Edm.String or Collection(Edm.String) are searchable by default. This property must be false for simple fields of other non-string data types, and it must be null for complex fields. Note: searchable fields consume extra space in your index to accommodate additional tokenized versions of the field value for full-text searches. If you want to save space in your index and you don't need a field to be included in searches, set searchable to false.

filterableboolean

A value indicating whether to enable the field to be referenced in $filter queries. filterable differs from searchable in how strings are handled. Fields of type Edm.String or Collection(Edm.String) that are filterable do not undergo word-breaking, so comparisons are for exact matches only. For example, if you set such a field f to "sunny day", $filter=f eq 'sunny' will find no matches, but $filter=f eq 'sunny day' will. This property must be null for complex fields. Default is true for simple fields and null for complex fields.

sortableboolean

A value indicating whether to enable the field to be referenced in $orderby expressions. By default, the search engine sorts results by score, but in many experiences users will want to sort by fields in the documents. A simple field can be sortable only if it is single-valued (it has a single value in the scope of the parent document). Simple collection fields cannot be sortable, since they are multi-valued. Simple sub-fields of complex collections are also multi-valued, and therefore cannot be sortable. This is true whether it's an immediate parent field, or an ancestor field, that's the complex collection. Complex fields cannot be sortable and the sortable property must be null for such fields. The default for sortable is true for single-valued simple fields, false for multi-valued simple fields, and null for complex fields.

facetableboolean

A value indicating whether to enable the field to be referenced in facet queries. Typically used in a presentation of search results that includes hit count by category (for example, search for digital cameras and see hits by brand, by megapixels, by price, and so on). This property must be null for complex fields. Fields of type Edm.GeographyPoint or Collection(Edm.GeographyPoint) cannot be facetable. Default is true for all other simple fields.

analyzerstring

Defines the names of all text analyzers supported by the search engine.

One ofar.microsoftar.lucenehy.lucenebn.microsofteu.lucenebg.microsoftbg.luceneca.microsoftca.lucenezh-Hans.microsoftzh-Hans.lucenezh-Hant.microsoftzh-Hant.lucenehr.microsoftcs.microsoftcs.luceneda.microsoftda.lucenenl.microsoftnl.luceneen.microsoften.luceneet.microsoftfi.microsoftfi.lucenefr.microsoftfr.lucenegl.lucenede.microsoftde.luceneel.microsoftel.lucenegu.microsofthe.microsofthi.microsofthi.lucenehu.microsofthu.luceneis.microsoftid.microsoft

searchAnalyzerstring

Defines the names of all text analyzers supported by the search engine.

One ofar.microsoftar.lucenehy.lucenebn.microsofteu.lucenebg.microsoftbg.luceneca.microsoftca.lucenezh-Hans.microsoftzh-Hans.lucenezh-Hant.microsoftzh-Hant.lucenehr.microsoftcs.microsoftcs.luceneda.microsoftda.lucenenl.microsoftnl.luceneen.microsoften.luceneet.microsoftfi.microsoftfi.lucenefr.microsoftfr.lucenegl.lucenede.microsoftde.luceneel.microsoftel.lucenegu.microsofthe.microsofthi.microsofthi.lucenehu.microsofthu.luceneis.microsoftid.microsoft

indexAnalyzerstring

Defines the names of all text analyzers supported by the search engine.

One ofar.microsoftar.lucenehy.lucenebn.microsofteu.lucenebg.microsoftbg.luceneca.microsoftca.lucenezh-Hans.microsoftzh-Hans.lucenezh-Hant.microsoftzh-Hant.lucenehr.microsoftcs.microsoftcs.luceneda.microsoftda.lucenenl.microsoftnl.luceneen.microsoften.luceneet.microsoftfi.microsoftfi.lucenefr.microsoftfr.lucenegl.lucenede.microsoftde.luceneel.microsoftel.lucenegu.microsofthe.microsofthi.microsofthi.lucenehu.microsofthu.luceneis.microsoftid.microsoft

normalizerstring

Defines the names of all text normalizers supported by the search engine.

One ofasciifoldingelisionlowercasestandarduppercase

dimensionsinteger (int32)

The dimensionality of the vector field.

vectorSearchProfilestring

The name of the vector search profile that specifies the algorithm and vectorizer to use when searching the vector field.

vectorEncodingstring

The encoding format for interpreting vector field contents.

One ofpackedBit

synonymMapsarray<string>

A list of the names of synonym maps to associate with this field. This option can be used only with searchable fields. Currently only one synonym map per field is supported. Assigning a synonym map to a field ensures that query terms targeting that field are expanded at query-time using the rules in the synonym map. This attribute can be changed on existing fields. Must be null or an empty collection for complex fields.

fieldsarray<object>

A list of sub-fields if this is a field of type Edm.ComplexType or Collection(Edm.ComplexType). Must be null or empty for simple fields.

scoringProfilesarray<object>

The scoring profiles for the index.

namestringrequired

The name of the scoring profile.

textobject1 fields

Defines weights on index fields for which matches should boost scoring in search queries.

functionsarray<object>4 fields

The collection of functions that influence the scoring of documents.

functionAggregationstring

Defines the aggregation function used to combine the results of all the scoring functions in a scoring profile.

One ofsumaverageminimummaximumfirstMatching

defaultScoringProfilestring

The name of the scoring profile to use if none is specified in the query. If this property is not set and no scoring profile is specified in the query, then default scoring (tf-idf) will be used.

corsOptionsobject

Defines options to control Cross-Origin Resource Sharing (CORS) for an index.

allowedOriginsarray<string>required

The list of origins from which JavaScript code will be granted access to your index. Can contain a list of hosts of the form {protocol}://{fully-qualified-domain-name}[:{port#}], or a single '*' to allow all origins (not recommended).

maxAgeInSecondsinteger (int64)

The duration for which browsers should cache CORS preflight responses. Defaults to 5 minutes.

suggestersarray<object>

The suggesters for the index.

namestringrequired

The name of the suggester.

searchModestringrequired

A value indicating the capabilities of the suggester.

One ofanalyzingInfixMatching

sourceFieldsarray<string>required

The list of field names to which the suggester applies. Each field must be searchable.

analyzersarray<object>

The analyzers for the index.

@odata.typestringrequired

A URI fragment specifying the type of analyzer.

namestringrequired

The name of the analyzer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters.

tokenizersarray<object>

The tokenizers for the index.

@odata.typestringrequired

A URI fragment specifying the type of tokenizer.

namestringrequired

The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters.

tokenFiltersarray<object>

The token filters for the index.

@odata.typestringrequired

A URI fragment specifying the type of token filter.

namestringrequired

The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters.

charFiltersarray<object>

The character filters for the index.

@odata.typestringrequired

A URI fragment specifying the type of char filter.

namestringrequired

The name of the char filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters.

normalizersarray<object>

The normalizers for the index.

@odata.typestringrequired

A URI fragment specifying the type of normalizer.

namestringrequired

The name of the normalizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters. It cannot end in '.microsoft' nor '.lucene', nor be named 'asciifolding', 'standard', 'lowercase', 'uppercase', or 'elision'.

encryptionKeyobject

A customer-managed encryption key in Azure Key Vault. Keys that you create and manage can be used to encrypt or decrypt data-at-rest, such as indexes and synonym maps.

keyVaultKeyNamestringrequired

The name of your Azure Key Vault key to be used to encrypt your data at rest.

keyVaultKeyVersionstringrequired

The version of your Azure Key Vault key to be used to encrypt your data at rest.

keyVaultUristringrequired

The URI of your Azure Key Vault, also referred to as DNS name, that contains the key to be used to encrypt your data at rest. An example URI might be `https://my-keyvault-name.vault.azure.net`.

accessCredentialsobject2 fields

Credentials of a registered application created for your search service, used for authenticated access to the encryption keys stored in Azure Key Vault.

similarityobject

Base type for similarity algorithms. Similarity algorithms are used to calculate scores that tie queries to documents. The higher the score, the more relevant the document is to that specific query. Those scores are used to rank the search results.

@odata.typestringrequired
semanticobject

Defines parameters for a search index that influence semantic capabilities.

defaultConfigurationstring

Allows you to set the name of a default semantic configuration in your index, making it optional to pass it on as a query parameter every time.

configurationsarray<object>3 fields

The semantic configurations for the index.

vectorSearchobject

Contains configuration options related to vector search.

profilesarray<object>4 fields

Defines combinations of configurations to use with vector search.

algorithmsarray<object>2 fields

Contains configuration options specific to the algorithm used during indexing or querying.

vectorizersarray<object>2 fields

Contains configuration options on how to vectorize text vector queries.

compressionsarray<object>4 fields

Contains configuration options specific to the compression method used during indexing or querying.

@odata.etagstring

The ETag of the index.

json
{
  "name": "string",
  "fields": [
    {
      "name": "string",
      "type": "Edm.String",
      "key": false,
      "retrievable": false,
      "stored": false,
      "searchable": false,
      "filterable": false,
      "sortable": false,
      "facetable": false,
      "analyzer": "ar.microsoft",
      "searchAnalyzer": "ar.microsoft",
      "indexAnalyzer": "ar.microsoft"
    }
  ],
  "description": "string",
  "scoringProfiles": [
    {
      "name": "string",
      "text": {
        "weights": {}
      },
      "functions": [
        {
          "type": "string",
          "fieldName": "string",
          "boost": 0,
          "interpolation": "linear"
        }
      ],
      "functionAggregation": "sum"
    }
  ],
  "defaultScoringProfile": "string",
  "corsOptions": {
    "allowedOrigins": [
      "string"
    ],
    "maxAgeInSeconds": 0
  },
  "suggesters": [
    {
      "name": "string",
      "searchMode": "analyzingInfixMatching",
      "sourceFields": [
        "string"
      ]
    }
  ],
  "analyzers": [
    {
      "@odata.type": "string",
      "name": "string"
    }
  ],
  "tokenizers": [
    {
      "@odata.type": "string",
      "name": "string"
    }
  ],
  "tokenFilters": [
    {
      "@odata.type": "string",
      "name": "string"
    }
  ],
  "charFilters": [
    {
      "@odata.type": "string",
      "name": "string"
    }
  ],
  "normalizers": [
    {
      "@odata.type": "string",
      "name": "string"
    }
  ]
}

Response

Returns 201 with a any. Read it in later steps with {{indexesCreate.response.data.<field>}}.

Need more? See the Azure AI Search guide for connection setup and behaviour shared by every action.