disablePrefixOnAttributes

scope settings
type array of strings
default []
description

List of attributes on which you want to disable prefix matching

This setting is useful on attributes that contain string that should not be matched as a prefix (for example a product SKU).

The list must be a subset of the searchableAttributes index setting.

searchableAttributes must not be empty nor null for disablePrefixOnAttributes to be applied.

Examples

Disable prefix search for some attributes by default

<?php
$index->setSettings([
  'disablePrefixOnAttributes' => [
    'sku',
  ]
]);
index.set_settings({
  disablePrefixOnAttributes: [
    'sku'
  ]
})
index.setSettings({
  disablePrefixOnAttributes: ['sku']
});
index.set_settings({
    'disablePrefixOnAttributes': [
        'sku',
    ]
})
index.setSettings([
    "disablePrefixOnAttributes": [
        "sku"
    ]
])
index.setSettings(new JSONObject().put("disablePrefixOnAttributes", "sku"));
index.SetSettings(
  JObject.Parse(@"{""disablePrefixOnAttributes"":[""sku""]}")
);
index.setSettings(
  new IndexSettings().setDisablePrefixOnAttributes(Arrays.asList("sku"))
);
res, err := index.SetSettings(algoliasearch.Map{
    "disablePrefixOnAttributes": []string{
        "sku",
    },
})
client.execute {
  changeSettings of "myIndex" `with` IndexSettings(
    disablePrefixOnAttributes = Some(Seq(
      "sku"
    ))
  )
}
Php small white
PHP
Ruby small white
Ruby
Javascript small white
JavaScript
Python small white
Python
Swift small white
iOS
Android small white
Android
Csharp small white
C#
Java small white
Java
Go small white
Go
Scala small white
Scala
Php small white
PHP
Ruby small white
Ruby
Javascript small white
JavaScript
Python small white
Python
Swift small white
iOS
Android small white
Android
Csharp small white
C#
Java small white
Java
Go small white
Go
Scala small white
Scala