The config clause controls pagination, response format, and ranking scope for search results.
Parameters
| Parameter | Type | Required | Valid value | Default | Description |
|---|---|---|---|---|---|
start | INT | No | [0, 5000] | 0 | Offset of the first document to return. |
hit | INT | No | [0, 500] | 10 | Maximum number of documents per result set. |
format | STRING | No | JSON, fullJSON | JSON | Response format. fullJSON includes two additional fields: variableValue and sortExprValues. |
rerank_size | INT | No | [0, 2000] | 200 | Number of documents passed to the fine sort expression. |
total_rank_size | INT | No | — | — | Number of documents passed to the rough sort expression. |
default_operator | STRING | No | AND, OR | AND | Default query operator. Supported only for exclusive instances. |
Usage notes
The config clause is optional.
Separate key-value pairs with commas (
,). Separate each key and value with a colon (:).The sum of
startandhitmust not exceed 5,000. Queries that exceed this limit return an error with no results. This limit exists because retrieving deep result windows requires loading all preceding documents into memory, which increases resource usage significantly. To paginate beyond 5,000 documents, use a scroll search instead.default_operatoris supported only for exclusive instances.total_rank_sizeuses different syntax depending on your SDK:Java SDK:
config.addToCustomConfig("total_rank_size:200000");PHP SDK:
$params->setCustomConfig('total_rank_size', 200000);
To include sort details in the response, add
format:fulljsonto the config clause. ThesortExprValuesfield in the response is an array of sort field values corresponding to the sort clause. For example, withsort=-price;-RANK,sortExprValuesreturns[price, Document score]. If no sort clause is configured,sortExprValuesreturns the document score by default.
Response format: JSON vs fullJSON
| Field | JSON | fullJSON |
|---|---|---|
| Standard result fields | Yes | Yes |
variableValue | — | Yes |
sortExprValues | — | Yes |
Use fullJSON when you need to inspect per-document sort scores or variable expression values — for example, when debugging ranking behavior.
Examples
Paginate results — 20 documents per page
# Page 1
config=start:0, hit:20, format:xml
# Page 2
config=start:20, hit:20, format:xmlThe source document usesformat:xmlin this paging example. However, the Parameters table lists onlyJSONandfullJSONas supported format values. This inconsistency exists in the original source and is flagged for product team review.
Set the fine sort candidate pool to 1,000 documents
config=start:0, hit:20, rerank_size:1000Limit rough sort to 100 documents
config=start:0, hit:20, total_rank_size:100What's next
Scroll searches — retrieve more than 5,000 documents across multiple pages