minWordSizefor2Typos

scope settings search
type integer
default 8
formerly known as minWordSizeForApprox2
description

Minimum number of characters a word in the query string must contain to accept matches with two typos.

Examples

Set default min word size to allow 2 typo

<?php
$index->setSettings([
  'minWordSizefor2Typos' => 4
]);
index.set_settings({
  minWordSizefor2Typos: 4
})
index.setSettings({
  minWordSizefor2Typos: 4
});
index.set_settings({
  'minWordSizefor2Typos': 4
})
index.setSettings([
    "minWordSizefor2Typos": 4
])
index.setSettings(new JSONObject().put("minWordSizefor2Typos", 4));
index.SetSettings(
  JObject.Parse(@"{""minWordSizefor2Typos"":""4""}")
);
index.setSettings(
  new IndexSettings().setMinWordSizefor2Typos(4)
);
res, err := index.SetSettings(algoliasearch.Map{
    "minWordSizefor2Typos": 4,
})
client.execute {
  changeSettings of "myIndex" `with` IndexSettings(
    minWordSizefor2Typos = Some(4)
  )
}
<?php
$results = $index->search('query', [
  'minWordSizefor2Typos' => 4
]);
results = index.search('query', {
  minWordSizefor2Typos: 4
})
index.search({
  query: 'query',
  minWordSizefor2Typos: 4
}).then(res => {
  // console.log(res);
});
results = index.search('query', {
    'minWordSizefor2Typos': 4
})
let query = Query(query: "query")
query.minWordSizefor2Typos = 4

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