Skip to content

Commit

Permalink
docs: adds JSON file index documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
micheleriva committed Oct 30, 2023
1 parent db443f7 commit 999bddf
Show file tree
Hide file tree
Showing 12 changed files with 2,504 additions and 49 deletions.
7 changes: 5 additions & 2 deletions packages/docs/components/Screenshot/index.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import Image from 'next/image'
import Zoom from 'react-medium-image-zoom'
import clx from 'classnames'
import 'react-medium-image-zoom/dist/styles.css'

export function Screenshot({ src, alt }) {
export function Screenshot({ src, alt, border = true }) {
return (
<Zoom>
<Image src={src} width={1280} height={720} alt={alt} className='nx-rounded-md nx-my-8 nx-border nx-border-neutral-200' />
<Image src={src} width={1280} height={720} alt={alt} className={clx('nx-rounded-md nx-my-8', {
'nx-border nx-border-neutral-200': border
})} />
</Zoom>
)
}
1 change: 1 addition & 0 deletions packages/docs/pages/cloud/data-sources/custom/_meta.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"introduction": "Introduction",
"rest-api": "REST API",
"webhook": "Webhook",
"csv-file": "CSV File",
Expand Down
20 changes: 20 additions & 0 deletions packages/docs/pages/cloud/data-sources/custom/introduction.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Custom Integrations

Orama Cloud provides a growing number of custom integrations with popular CMSs, eCommerce platforms, and other web applications.

Even though, if you want to connect Orama to a proprietary or custom software, you can use our **custom integration system** to feed Orama with your data.

## How it works

As for today, we support 4 different ways to feed Orama with your data:

- [JSON File Upload](./json-file.mdx)
- [CSV FIle Upload](./csv-file.mdx)
- [REST API](./rest-api.mdx)
- [WebHooks](./webhooks.mdx) (work in progress)

You can use any of the above methods to feed Orama with your data. You can even use all of them at the same time on different indexes.

For example, you can use the JSON File Upload to feed the `products` index and the REST API to feed the `blog` index.

With custom data sources, you choose how to feed Orama with your data.
61 changes: 60 additions & 1 deletion packages/docs/pages/cloud/data-sources/custom/json-file.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,62 @@
import { Screenshot } from '../../../../components/Screenshot'

# Import a JSON file to Orama Cloud

Work in progress.
With Orama Cloud, you can upload a JSON file as a data source.
Once you upload it to Orama Cloud, it will be distributed in our Global Search Network, making it available in 300 global locations worldwide.

## Creating the index

As always, you can create a new Orama Cloud index by going to [https://cloud.oramasearch.com/indexes/new](https://cloud.oramasearch.com/indexes/new).

Once you're there, you will be presented with the following screen:

<Screenshot
src='/cloud/guides/json-file/orama-cloud-index-creation.png'
alt='Create a new JSON File index with Orama Cloud'
border={false}
/>

Of course, you can choose any name and description you want for your index. In this example, we will use the name `My JSON File Index`.

After selecting "JSON File" as a data source, we can click on the "Create Index" button, and we'll see the following screen:

<Screenshot
src='/cloud/guides/json-file/orama-cloud-index-feed.png'
alt='Feeding a JSON File index with Orama Cloud'
border={false}
/>

At this point, we can upload our JSON file by dragging and dropping it into the dedicated area, or by clicking on the "Choose a file" area and selecting the file from our computer.

As soon as we do that, we will see the preview of the JSON file, which will help us write the Orama Schema for our index.

<Screenshot
src='/cloud/guides/json-file/orama-cloud-index-json-preview.png'
alt='JSON preview of a JSON File index with Orama Cloud'
border={false}
/>

We can also use the "autodetect" feature, which will automatically generate a schema for us. This is an experimental feature, so please always double check the generated schema.

<Screenshot
src='/cloud/guides/json-file/orama-cloud-index-json-autodetect.png'
alt='Auto detecting the schema of a JSON File index with Orama Cloud'
border={false}
/>

Once we are happy with the schema, we can click on the "Save and deploy" button, and our index will be deployed.

<Screenshot
src='/cloud/guides/json-file/orama-cloud-index-json-deploy.png'
alt='Deploying a JSON File index with Orama Cloud'
border={false}
/>

## Integrating Orama Cloud into your app

Now that you have your index deployed, you can start using it in your app.

Orama Cloud provides an official SDK for JavaScript that runs on every JavaScript runtime. You can use it to query your data.

To learn more about the SDK, check out the [documentation](/cloud/integrating-orama-cloud/javascript-sdk).
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

With Orama, you can integrate with every external system, library, and API.

While we let you build your own integrations via our **custom integrations** feature, we also provide a set of native integrations that you can use out of the box.
While we let you build your own integrations via our [custom integrations](/cloud/data-sources/custom/introduction) feature, we also provide a set of native integrations that you can use out of the box.

At the time of writing this, we have the following native integrations:

Expand Down
Loading

1 comment on commit 999bddf

@vercel
Copy link

@vercel vercel bot commented on 999bddf Oct 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.