The ReactiveSearch Realm project deploys the ReactiveSearch API as a transpiled JS code into a Realm function. The goal of this project is to enable Atlas Search users to be able to build search UIs using Searchbox and ReactiveSearch UI libraries.
Note on current project status: This project is being actively developed and currently in a MVP stage where Atlas Search users can deploy the Realm function and run it with the React Searchbox library. Follow the below guides to get started and test this.
git clone https://github.com/appbaseio/reactivesearch-realm-function.git
cd reactivesearch-realm-function
npm i
npm start
npm run start:test
cp .env.sample .env
.env
file. DB_URL
and DB_NAME
are the required envnpm run dev
/:collection_name/_reactivesearch
-> Endpoint to execute rs query and get mongo response. Sample output {data: []}
. collection_name
is dynamic param that one can pass against which query is to be executed/:collection_name/_reactivesearch/validate
-> Endpoint to validate rs query and get the aggregation pipleline in response.Make curl
/ rest
request
curl --location --request POST 'http://localhost:8080/_reactivesearch' \
--header 'Content-Type: application/json' \
--data-raw '{
"query": [{
"id": "search",
"type": "search",
"dataField": "*",
"size": 5
}],
"mongodb": {
"db": "sample_airbnb",
"collection": "listingsAndReviews"
}
}'
Go over the steps to deploy this project over here.
Go over the steps to deploy the search UI with MongoDB App Services over here.