Skip to main content
Required ACL: editSettings You can set an A/B test on two different indices with different settings, or on the same index with different search parameters by providing a customSearchParameters setting on one of the variants.

Examples

Add an A/B test on a single index with custom search parameters

Parameters

abTest
object
required
The definition of the A/B test.

Response

abTestID
integer
Generated Id of the A/B test.
index
string
Base index name for the A/B test.
taskID
integer
The task ID used with the waitTask method.

Response as JSON

This section shows the JSON response returned by the API. Each API client wraps this response in language-specific objects, so the structure may vary. To view the response, use the getLogs method. Don’t rely on the order of properties—JSON objects don’t preserve key order.
JSON
Last modified on May 7, 2026