I’ll preface this by stating that I’m not a developer, I’m from a pharmaceutical background trying to create a tool for academic research.
I’m trying to use the atlas $search function (which provides a fuzzy search for my database hosted on mongo) in a Retool App. Currently, I am using the DATA API provided by atlas but I can only use ‘filter’ and ‘projection’ params to get results.
Is there some documentation about calling the $search function via POST since Retool supports RESTful as a method to pull data for my webapp.
Is there some documentation about calling the $search function via POST since Retool supports RESTful as a method to pull data for my webapp.
The Atlas Search queries take the form of an aggregation pipeline stage. You will be need to use the POST /action/aggregate endpoint for the Atlas Data API for $search queries. The following Run an Aggregation Pipeline documentation may help you this although the example on the page does not have a $search stage used as part of the pipeline. However, please see the below example I’ve used against a test system which includes the $search stage:
Thanks! This worked for me. Is there also a way to implement fuzzy search through /aggregate? Because I can now successfully match using $Search but am unable to get anything but an exact string match
Is there also a way to implement fuzzy search through /aggregate? Because I can now successfully match using $Search but am unable to get anything but an exact string match
I would recommend creating a new topic for this query with details about the use case, current output, expected output, pipeline stages and anything else that may assist with finding a solution