This repository contains examples of using Atlas Search with Java.
The First Search Example code was written for the article "Using Atlas Search From Java".
This example uses the run target and searches the default index.
In order to run the FirstSearchExample, follow these steps:
- Add the sample collections to your Atlas cluster
- If you're not already an Atlas user, get started with Atlas
- Create an Atlas Search index on the
moviescollection, nameddefault - Run the example program:
ATLAS_URI="<<insert your connection string here>>" ./gradlew run
Questions about this repo or how to use Atlas Search and Java together? Ask them in the MongoDB Community.