Index

Create an index within the directory associated with the specified API key and return the index_id.

post/api/v1/index

Request

Headers

apikeystring required

YOUR_SECRET_API_KEY

Request body

Example request

{
  "schema": [
    {
      "field": "title",
      "field_type": "Text",
      "store": true,
      "index_lexical": true,
      "boost": 10
    },
    {
      "field": "body",
      "field_type": "Text",
      "store": true,
      "index_lexical": true,
      "longest": true
    },
    {
      "field": "url",
      "field_type": "Text",
      "store": true,
      "index_lexical": false
    },
    {
      "field": "date",
      "field_type": "Timestamp",
      "store": true,
      "index_lexical": false,
      "facet": true
    }
  ],
  "synonyms": [
    {
      "terms": [
        "berry",
        "lingonberry",
        "blueberry",
        "gooseberry"
      ],
      "multiway": false
    }
  ]
}

Response

Index created, returns the index_id

Changes

    • breaking

      added the new required request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • info

      the request property // became optional

    • info

      the request property // became optional

    • info

      the request property // became optional

    • breaking

      removed the enum value PotionCode16M of the request property ///

    • info

      added the new PotionCode16MV2 enum value to the request property ///