Product Updates

DatoCMS changelog for new features and general improvements
Content Management API

Site search now supports fuzzy search

September 6th, 2022

We just introduced a new parameter that can be added to the filter parameter of site search to enable a fuzzy search. When the parameter fuzzy filter is present, our search engine will find strings that approximately match the query provided.

Here is an example of how to use the feature:

const searchResults = await client.searchResults.list({
page: {
offset: 200,
limit: 20
},
filter: {
fuzzy: true,
query: 'florance',
build_trigger_id: '44',
locale: 'en'
}
});
searchResults.forEach((searchResult) => {
console.log(searchResult);
});

In this example, strings like florence will be matched, even if the query is florance.

Please refer to the site search page in the Content Management API documentation for a complete example.

Start using DatoCMS today
According to Gartner 89% of companies plan to compete primarily on the basis of customer experience this year. Don't get caught unprepared.
  • No credit card
  • Easy setup
Subscribe to our newsletter! 📥
One update per month. All the latest news and sneak peeks directly in your inbox.
support@datocms.com ©2024 Dato srl, all rights reserved P.IVA 06969620480