setAllowTyposOnNumericTokens method

AlgoliaQuery setAllowTyposOnNumericTokens(
  1. bool value
)

AllowTyposOnNumericTokens

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

allowTyposOnNumericTokens: true|false

Source: Learn more

Implementation

AlgoliaQuery setAllowTyposOnNumericTokens(bool value) {
  assert(!_parameters.containsKey('allowTyposOnNumericTokens'));
  return _copyWithParameters(
      <String, dynamic>{'allowTyposOnNumericTokens': value});
}