🎉 Try the public beta of the new docs site at algolia.com/doc-beta! 🎉
API client / Methods
List of methods

We released a new version of the JavaScript API client in public beta. Read the beta documentation for more information.

We released a new version of the PHP API client in public beta. Read the beta documentation for more information.

We released a new version of the Java API client in public beta. Read the beta documentation for more information.

Create an index

Algolia creates a new index when you add a new object or add a setting to an empty index for the first time. Initializing a new index with the API client doesn’t create a new index on Algolia’s servers.

Don’t use sensitive or personally identifiable information (PII) as your index name, including names, user IDs, or email addresses. Index names appear in network requests and are publicly visible.

Asynchronous methods

All methods for managing indices are asynchronous. Calling these methods adds a new job to a queue: it’s this job, and not the method, that performs the desired action. Usually, the job takes seconds or milliseconds, but this depends on what’s in the queue: if the queue has many pending tasks, the new job must wait its turn.

To help managing the job queue, each method returns a unique taskID which you can pass to the waitTask method. Waiting for a task guarantees that the job has finished before proceeding with your new requests. Use waitTask to manage dependencies, for example, when deleting an index before creating a new index with the same name, or clearing an index before adding new objects.

Analytics data

Analytics data is connected to an index, and uses the index’s name.

Analytics data is collected on a separate server, using separate processes to your main indices. There’s no hard link between your indices and the collection and storage of their analytics data. They’re two sets of data on separate servers. Therefore, actions like deleting or moving an index don’t affect your analytics data.

Copying or moving an index doesn’t transfer analytics data from source to destination:

  • The analytics data stays on the source index.
  • The destination index doesn’t gain any new analytics data.

Even if you delete an index or change its name, the analytics data isn’t erased: you can still access it from the dashboard’s Analytics menu (by first creating a new blank index using the original index name).

Did you find this page helpful?