Api clients / Ruby / V1 / Methods

Get Settings | Ruby API Client V1 (Deprecated)

This version of the Ruby API client has been deprecated in favor of the latest version of the Ruby API client.

Required API Key: any key with the settings ACL
Method signature
index.get_settings()

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 request options to send along with the request.

Response# A

In this section we document the JSON response returned by the API. Each language will encapsulate this response inside objects specific to the language and/or the implementation. So the actual type in your language might differ from what is documented.

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?