> ## Documentation Index
> Fetch the complete documentation index at: https://algolia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set dictionary settings

> Turn standard dictionary entries on or off.

export const Legacy = ({title, href}) => {
  return <Note>

    This page documents an earlier version of the API client.
    For the latest version, see <a href={href}>{title}</a>.

    </Note>;
};

<Legacy title="Update dictionary settings" href="/doc/libraries/sdk/methods/search/set-dictionary-settings" />

**Required ACL:** `editSettings`

## Examples

### Set stopword settings

<CodeGroup>
  ```cs C# theme={"system"}
  DictionarySettings dictionarySettings = new DictionarySettings()
  {
    DisableStandardEntries = new DisableStandardEntries()
    {
      StopWords = new Dictionary() { "en", true }
    }
  };

  // Synchronous
  dictionaryClient.SetDictionarySettings(dictionarySettings);

  // Asynchronous
  var setDictionarySettingsResponse = await dictionaryClient.SetDictionarySettingsAsync(dictionarySettings);
  setDictionarySettingsResponse.Wait()
  ```

  ```go Go theme={"system"}
  settings = search.DictionarySettings{
    DisableStandardEntries: opt.DisableStandardEntries(map[string]map[string]bool{"stopwords": {"en": true}),
  }

  res, err := client.SetDictionarySettings(settings)
  ```

  ```java Java theme={"system"}
  DictionarySettings settings =
      new DictionarySettings()
          .setDisableStandardEntries(
              new DisableStandardEntries().setStopwords(Collections.singletonMap("en", true)));
  // Synchronous
  client.setDictionarySettings(settings);
  // Asynchronous
  client.setDictionarySettingsAsync(settings);
  ```

  ```js JavaScript theme={"system"}
  client.setDictionarySettings({
    disableStandardEntries: {
      stopwords: {
        en: true,
      },
    },
  });
  ```

  ```kotlin Kotlin theme={"system"}
  val settings = DictionarySettings(
      disableStandardEntries = DisableStandardEntries(
          stopwords = mapOf(Language.English to true)
      )
  )
  client.setDictionarySettings(settings)
  ```

  ```php PHP theme={"system"}
  $client->setDictionarySettings(array(
    'disableStandardEntries' => array(
      'stopwords' => array(
        'en' => true
      )
    )
  ));
  ```

  ```python Python theme={"system"}
  client.set_dictionary_settings({
    'disableStandardEntries': {
      'stopwords': { 'en': True }
    }
  })
  ```

  ```ruby Ruby theme={"system"}
  client.set_dictionary_settings({
    disableStandardEntries: {
      stopwords: {
        en: true
      }
    }
  })
  ```

  ```scala Scala theme={"system"}
  val settings = DictionarySettings(
    Some(
      DisableStandardEntries(
        stopwords = Some(Map("en" -> true))
      )
    )
  )

  client.execute {
    set dictionarySettings settings
  }
  ```

  ```swift Swift theme={"system"}
  let settings = DictionarySettings(disableStandardEntries: .init(stopwords: [.english: true]))

  client.setDictionarySettings(settings) { result in
    if case .success(let response) = result {
      print("Response: \(response)")
    }
  }
  ```
</CodeGroup>

### Reset stopword settings

<CodeGroup>
  ```cs C# theme={"system"}
  DictionarySettings dictionarySettings = new DictionarySettings()
  {
    DisableStandardEntries = new DisableStandardEntries()
    {
      StopWords = null
    }
  };

  // Synchronous
  dictionaryClient.SetDictionarySettings(dictionarySettings);

  // Asynchronous
  var setDictionarySettingsResponse = await dictionaryClient.SetDictionarySettingsAsync(dictionarySettings);
  setDictionarySettingsResponse.Wait()
  ```

  ```go Go theme={"system"}
  settings = search.DictionarySettings{
    DisableStandardEntries: opt.DisableStandardEntries(map[string]map[string]bool{"stopwords": nil}),
  }

  res, err := client.SetDictionarySettings(settings)
  ```

  ```java Java theme={"system"}
  DictionarySettings settings =
      new DictionarySettings()
          .setDisableStandardEntries(new DisableStandardEntries().setStopwords(null));
  // Synchronous
  client.setDictionarySettings(settings);
  // Asynchronous
  client.setDictionarySettingsAsync(settings);
  ```

  ```js JavaScript theme={"system"}
  client.setDictionarySettings({
    disableStandardEntries: {
      stopwords: null
    },
  });
  ```

  ```kotlin Kotlin theme={"system"}
  val settings = DictionarySettings(
      disableStandardEntries = DisableStandardEntries(
          stopwords = null
      )
  )
  client.setDictionarySettings(settings)
  ```

  ```php PHP theme={"system"}
  $client->setDictionarySettings(array(
    'disableStandardEntries' => array(
      'stopwords' => null
    )
  ));
  ```

  ```python Python theme={"system"}
  client.set_dictionary_settings({
    'disableStandardEntries': {
      'stopwords': None
    }
  })
  ```

  ```ruby Ruby theme={"system"}
  client.set_dictionary_settings({
    disableStandardEntries: {
      stopwords: nil
    }
  })
  ```

  ```scala Scala theme={"system"}
  val settings = DictionarySettings(
    Some(
      DisableStandardEntries(
        stopwords = None
      )
    )
  )

  client.execute {
    set dictionarySettings settings
  }
  ```

  ```swift Swift theme={"system"}
  let settings = DictionarySettings(disableStandardEntries: .none)

  client.setDictionarySettings(settings) { result in
    if case .success(let response) = result {
      print("Response: \(response)")
    }
  }
  ```
</CodeGroup>

## Parameters

<ParamField body="settings" type="object" required>
  Map of language ISO codes supported by the dictionary (for example, "de" for German) to a boolean value.
  When set to `true`, the standard entries for the language are disabled.

  **Example:**

  ```jsonc JSON icon=braces theme={"system"}
  "disableStandardEntries": {
    "stopwords": {
      "ru": "true",
      "en": "true",
      // ...
    }
  }
  ```
</ParamField>

<ParamField body="requestOptions" type="object">
  A mapping of request options to send along with the request.
</ParamField>

## Response

<ResponseField name="taskID" type="integer">
  The task ID used with the [`waitTask`](/doc/libraries/sdk/v1/methods/wait-task) method.
</ResponseField>

<ResponseField name="updatedAt" type="string">
  Date at which the indexing job has been created.
</ResponseField>

### 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.

```jsonc JSON icon=braces theme={"system"}
{
  "updatedAt":"2013-01-18T15:33:13.556Z",
  "taskID": 678
}
```
