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

# camelCaseAttributes

> Attributes in which to split mixed-case words

export const Setting = ({type, default: defaultValue, defaultNote, scope, min, max, formerly}) => {
  const renderedDefault = defaultValue === '' ? '""' : defaultValue;
  const renderedNote = defaultNote ? `(${defaultNote})` : '';
  return <ul>
      <li><strong>Type:</strong> <code>{type}</code></li>
      <li><strong>Default:</strong> <code>{renderedDefault}</code>{renderedNote}</li>
      {min && <li><strong>Min:</strong> <code>{min}</code></li>}
      {max && <li><strong>Max:</strong> <code>{max}</code></li>}
      <li><strong>Scope:</strong> <a href="/doc/api-reference/api-parameters"><code>{scope}</code></a></li>
      {formerly && <li>
          <strong>Deprecated name:</strong> <code>{formerly}</code>
        </li>}
    </ul>;
};

<Setting type="list<string>" default="[]" scope="settings" />

The `camelCaseAttributes` parameter enables Algolia to treat mixed-case strings as multiple words.

Mixed case formatting joins words without spaces, capitalizing each word's first letter.
This includes common styles like `camelCase` (lowercase first word) and `PascalCase` (uppercase first word).

For example, with this setting, `"productID"` is interpreted as two searchable tokens: `"product"` and `"ID"`.

<Info>
  There's no hard limit on the number of attributes you can include,
  but adding too many can slow down [`getSettings`](/doc/rest-api/search/get-settings) operations
  and degrade performance in the Algolia dashboard.
</Info>

## Example

<AccordionGroup>
  <Accordion title="Current API clients" defaultOpen="true">
    <CodeGroup>
      ```cs C# theme={"system"}
      var response = await client.SetSettingsAsync(
        "INDEX_NAME",
        new IndexSettings { CamelCaseAttributes = new List<string> { "description" } }
      );
      ```

      ```dart Dart theme={"system"}
      final response = await client.setSettings(
        indexName: "INDEX_NAME",
        indexSettings: IndexSettings(
          camelCaseAttributes: [
            "description",
          ],
        ),
      );
      ```

      ```go Go theme={"system"}
      response, err := client.SetSettings(client.NewApiSetSettingsRequest(
        "INDEX_NAME",
        search.NewEmptyIndexSettings().SetCamelCaseAttributes(
          []string{"description"})))
      if err != nil {
        // handle the eventual error
        panic(err)
      }
      ```

      ```java Java theme={"system"}
      UpdatedAtResponse response = client.setSettings(
        "INDEX_NAME",
        new IndexSettings().setCamelCaseAttributes(Arrays.asList("description"))
      );
      ```

      ```js JavaScript theme={"system"}
      const response = await client.setSettings({
        indexName: 'theIndexName',
        indexSettings: { camelCaseAttributes: ['description'] },
      });
      ```

      ```kotlin Kotlin theme={"system"}
      var response =
        client.setSettings(
          indexName = "INDEX_NAME",
          indexSettings = IndexSettings(camelCaseAttributes = listOf("description")),
        )
      ```

      ```php PHP theme={"system"}
      $response = $client->setSettings(
          'INDEX_NAME',
          ['camelCaseAttributes' => [
              'description',
          ],
          ],
      );
      ```

      ```python Python theme={"system"}
      response = client.set_settings(
          index_name="INDEX_NAME",
          index_settings={
              "camelCaseAttributes": [
                  "description",
              ],
          },
      )
      ```

      ```ruby Ruby theme={"system"}
      response = client.set_settings(
        "INDEX_NAME",
        Algolia::Search::IndexSettings.new(camel_case_attributes: ["description"])
      )
      ```

      ```scala Scala theme={"system"}
      val response = Await.result(
        client.setSettings(
          indexName = "INDEX_NAME",
          indexSettings = IndexSettings(
            camelCaseAttributes = Some(Seq("description"))
          )
        ),
        Duration(100, "sec")
      )
      ```

      ```swift Swift theme={"system"}
      let response = try await client.setSettings(
          indexName: "INDEX_NAME",
          indexSettings: IndexSettings(camelCaseAttributes: ["description"])
      )
      ```
    </CodeGroup>
  </Accordion>

  <Accordion title="Legacy API clients">
    <CodeGroup>
      ```cs C# theme={"system"}
      IndexSettings settings = new IndexSettings();
      settings.CamelCaseAttributes = new List { "description" };

      index.SetSettings(settings);
      ```

      ```go Go theme={"system"}
      res, err := index.SetSettings(search.Settings{
      	CamelCaseAttributes: opt.CamelCaseAttributes("description"),
      })
      ```

      ```java Java theme={"system"}
      index.setSettings(
        new IndexSettings()
          .setCamelCaseAttributes(
             Collections.singletonList(
              "description"
            )
          )
      );
      ```

      ```js JavaScript theme={"system"}
      index
        .setSettings({
          camelCaseAttributes: ["description"],
        })
        .then(() => {
          // done
        });
      ```

      ```kotlin Kotlin theme={"system"}
      val settings = settings {
          camelCaseAttributes { +"description" }
      }

      index.setSettings(settings)
      ```

      ```php PHP theme={"system"}
      $index->setSettings([
        'camelCaseAttributes' => [
          'description'
        ]
      ]);
      ```

      ```python Python theme={"system"}
      index.set_settings({"camelCaseAttributes": ["description"]})
      ```

      ```ruby Ruby theme={"system"}
      index.set_settings(
        {
          camelCaseAttributes: [
            "description"
          ]
        }
      )
      ```

      ```scala Scala theme={"system"}
      client.execute {
        setSettings of "myIndex" `with` IndexSettings(
          camelCaseAttributes = Some(Seq("description"))
        )
      }
      ```

      ```swift Swift theme={"system"}
      let settings = Settings()
        .set(\.camelCaseAttributes, to: ["description"])

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