API Reference / API Methods / Settings / Get settings
Required API Key: any key with the settings ACL
Method signature
$index->getSettings()

About this method # A

Get the settings of an index.

You can find the list of settings in the Settings Parameters page.

Examples # A

Retrieve settings for an index#

1
2
$settings = $index->getSettings();
var_dump($settings);

Parameters # A

requestOptions #
type: key/value mapping
default: No request options
Optional

A mapping of requestOptions to send along with the request.

Response # A

This section shows the JSON response returned by the API. Since each language encapsulates this response inside objects specific to that language and/or implementation, the actual type in your language might differ from what’s written here. You can view the response in the logs (using the getLogs method).

JSON format#

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{
  "minWordSizefor1Typo": 4,
  "minWordSizefor2Typos": 8,
  "hitsPerPage": 20,
  "maxValuesPerFacet": 100,
  "searchableAttributes": [
    "title",
    "description",
    "author_name"
  ],
  "numericAttributesToIndex": null,
  "attributesToRetrieve": null,
  "unretrievableAttributes": null,
  "optionalWords": null,
  "attributesForFaceting": null,
  "attributesToSnippet": null,
  "attributesToHighlight": null,
  "paginationLimitedTo": 1000,
  "attributeForDistinct": null,
  "exactOnSingleWordQuery": "attribute",
  "ranking": [
    "typo",
    "geo",
    "words",
    "filters",
    "proximity",
    "attribute",
    "exact",
    "custom"
  ],
  "customRanking": null,
  "separatorsToIndex": "",
  "removeWordsIfNoResults": "none",
  "queryType": "prefixLast",
  "highlightPreTag": "<em>",
  "highlightPostTag": "<\/em>",
  "snippetEllipsisText": "",
  "alternativesAsExact": [
    "ignorePlurals",
    "singleWordSynonym"
  ]
}

This example of response contains a non exhaustive list of index settings that can be returned. See the full list.

Did you find this page helpful?
PHP v3