LogoLogo
  • Getting Started
  • Concepts
    • Indices & Schemas
    • Searching
  • Storing Your Data
    • Introduction to Storing
    • Indexing via the JSON API
    • Indexing Files (PDF, Word, etc.)
Powered by GitBook
On this page

Was this helpful?

  1. Storing Your Data

Indexing via the JSON API

Use our API to index JSON objects in your search engine.

Indexing a JSON file

Here's an example of a document that we want to index. Our index has been created with the built-in demo schema. Don't forget to replace your_index_id with the id of the index you created in the previous step.

POST http://localhost:8201/index/your_index_id
{
  "title": "Business Plan February 2018",
  "contents": "Our business plan for February 2018 is to grow from $10K MRR to $15k MRR. We will do this by doubling our client base."
}

and the equivalent cURL:

curl \
  -X POST \
  --header "Content-Type: application/json" \
  --data '{ "title": "Business Plan February 2019", "contents": "Our business plan for February 2018 is to grow from $10K MRR to $15k MRR. We will do this by doubling our client base." }' \
  http://localhost:8201/index/your_index_id

PreviousIntroduction to StoringNextIndexing Files (PDF, Word, etc.)

Last updated 6 years ago

Was this helpful?