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

Last updated