allowTyposOnNumericTokens

Type: boolean
Engine default: true
Parameter syntax
'allowTyposOnNumericTokens' => true|false
Parameter syntax
allowTyposOnNumericTokens: true|false
Parameter syntax
allowTyposOnNumericTokens: true|false
Parameter syntax
'allowTyposOnNumericTokens': True|False
Parameter syntax
"allowTyposOnNumericTokens": true|false
Parameter syntax
new JSONObject()
  .put("allowTyposOnNumericTokens", true|false)
Parameter syntax
dynamic settings = new JObject();
settings.allowTyposOnNumericTokens = true|false;
Parameter syntax
.setAllowTyposOnNumericTokens(true|false)
Parameter syntax
"allowTyposOnNumericTokens": true|false,
Parameter syntax
allowTyposOnNumericTokens = Some(true|false)

Can be used in these methods:
search, setSettings, browse, searchForFacetValues, generateSecuredApiKey, addApiKey, updateApiKey search, set_settings, browse, search_for_facet_values, generate_secured_api_key, add_api_key, update_api_key search, setSettings, browse, searchForFacetValues, generateSecuredApiKey, addApiKey, updateApiKey search, set_settings, browse, search_for_facet_values, generate_secured_api_key, add_api_key, update_api_key search, setSettings, browse, searchForFacetValues searchAsync, setSettingsAsync, browseAsync, searchForFacetValues Search, SetSettings, Browse, SearchForFacetValues, GenerateSecuredApiKey, AddApiKey, UpdateApiKey Search, setSettings, browse, searchForFacetValues, generateSecuredApiKey, addApiKey, updateApiKey Search, SetSettings, Browse, SearchForFacetValues, GenerateSecuredAPIKey, AddAPIKey, UpdateAPIKey search, changeSettings, browse index, search into facet values, generateSecuredApiKey, add key, update key

About this parameter

Whether to allow typos on numbers (“numeric tokens”) in the query string.

This option can be very useful on numbers with special formatting, like serial numbers and zip codes searches.


Usage notes:
  • When false, typo tolerance is disabled on numeric tokens. For example, the query 304 will match 30450 but not 40450 (which would have been the case with typo tolerance enabled).

Examples

Disable typos on numeric tokens by default

<?php
$index->setSettings([
  'allowTyposOnNumericTokens' => false
]);
index.set_settings({
  allowTyposOnNumericTokens: false
})
index.setSettings({
  allowTyposOnNumericTokens: false
});
index.set_settings({
    'allowTyposOnNumericTokens': False
})
index.setSettings([
  "allowTyposOnNumericTokens": false
])
index.setSettings(
  new JSONObject()
    .put("allowTyposOnNumericTokens", false)
);
dynamic settings = new JObject();
settings.allowTyposOnNumericTokens = true|false;

index.SetSettings(settings);
index.setSettings(
  new IndexSettings()
    .setAllowTyposOnNumericTokens(false)
);
res, err := index.SetSettings(algoliasearch.Map{
  "allowTyposOnNumericTokens": false,
})
client.execute {
  changeSettings of "myIndex" `with` IndexSettings(
    allowTyposOnNumericTokens = Some(false)
  )
}
<?php
$results = $index->search('query', [
  'allowTyposOnNumericTokens' => false
]);
results = index.search('query', {
  allowTyposOnNumericTokens: false
})
index.search({
  query: 'query',
  allowTyposOnNumericTokens: false
}).then(res => {
  // console.log(res);
});
results = index.search('query', {
  'allowTyposOnNumericTokens': False
})
let query = Query(query: "query")
query.allowTyposOnNumericTokens = false

index.search(query, completionHandler: { (res, error) in
  print(res)
})
index.search(
  new Query("query")
    .setAllowTyposOnNumericTokens(false)
);
index.search(
  new Query("")
    .EnableTyposOnNumericTokens(false)
)
index.search(
  new Query("")
    .setAllowTyposOnNumericTokens(false)
);
res, err := index.Search("query", algoliasearch.Map{
  "allowTyposOnNumericTokens": false,
})
client.execute {
  search into "myIndex" query Query(
    query = Some("query"),
    allowTyposOnNumericTokens = Some(false)
  )
}
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