Index can be thought of as the location where all your documents (product entries) are stored, it also contains additional configuration (like Language and Mapping) and is the base for your Search and Suggestion Queries.

Create Index - Request

To create a new Index in your project, issue a new HTTP POST request to the Lupa API:


Replace organizationName and projectName with your configuration.

  "language": "lt",
  "name": "new-index-name"
  • language - language code for the new index, ISO 639-1 standard.
  • name - a name for the new index. Must be an alphanumeric string, words separated by dashes. Name must be unique in a Project.

Create Index - Response

This will create a new empty index:

  "id": "ad28952f-50d5-4359-8b78-fa809eaf2584",
  "name": "new-index-name",
  "language": "lt",
  "type": "DOC",
  "isEnabled": 1,
  "createdByUserId": "de4e47ca-d76e-4d8a-a7f2-dea5f3787059",
  "needsReindex": 0,
  "reindexInProgress": 0,
  "createdAt": "2021-11-05T13:24:44.000Z",
  "updatedAt": "2021-11-05T13:24:44.000Z",
  "reindexedAt": null,
  "mapping": null,
  "metadata": {}

The returned Index id will be used for further configuration.

Next steps

The index is not ready yet. We need to set its Mapping to configure the format of our data.


See also: