Hi Alberto Ramirez •,
Greetings!!
Fuzzy search in Cosmos DB is currently a preview feature, so it needs to be enabled before you can use the JSON syntax.
How to fix it:
- In the Azure portal, go to your Cosmos DB account → Features → Preview Capabilities and enable Full-Text Search Preview.
- Make sure your container has a full-text policy and index for the field you want to search.
- After that, you can run queries like
SELECT TOP 10 *
FROM c
WHERE FullTextContains(c.text, {"term":"red","distance":1})
For more information, please refer the document: https://learn.microsoft.com/en-us/azure/cosmos-db/gen-ai/full-text-search#fuzzy-search
Hope this helps. Do let us know if you have any further queries.
If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.