Create a Data Source
Create a data source from the Orama Cloud Dashboard.
As seen in the introduction page, a data source is a collection of documents that can be queried using the Orama API.
Each document in a data source must be a valid JSON object. You don't need to worry about the structure of the documents, as Orama will automatically index them for you.
That means that you can use any JSON object as a document, and Orama will take care of the rest, from embeddings generation to indexing and querying.
To create a new data source, simply click on the "add data source" button inside of your collection page. This will open the following modal:
Here, you can select the data source type (REST API, JSON file, Docusaurus website, etc.) depending on your needs.
Let's try together creating a data source from a JSON file. Here you are a beautiful JSON file containing a complete Pokedex to be used for this tutorial: pokedex.json.
Once you have downloaded the file, click on the "JSON File" data source and give it a name and an optional description:
Now, in the next step, you can upload the JSON file you just downloaded:
Once you have selected the file, click on "save and sync" to start the indexing process. This will take a few seconds (or minutes depending on the size of the file) and will create a new data source in your collection.
Once the process is finished, you can go back to the collection page and see the new data source in the list of data sources:
Once there, you can test the data contained in your collection by clicking on the "test collection" buttom at the top right of the page. This will open a modal where you can perform some search queries on the data inside your collection:
Last updated on