Skip to content

Index multiple objects

Index multiple objects

You can index multiple objects in a batch using the import API.

When indexing multiple objects, this endpoint is much more performant, than calling the single object create endpoint multiple times in quick succession.

The object to import need to be formatted as a newline delimited JSON string, aka JSONLines (opens new window) format. This is essentially one JSON object per line, without commas between documents. For example, here are a set of 3 documents represented in JSONL format.

Objects > Index a single object

The endpoint allows indexing individual objects into collections while bulk imports are recommended for better performance when handling multiple objects simultaneously.

Answers > Collections

Collections act as organizational structures in Answers that group similar objects together and function like database tables for efficient data management and retrieval.

Collections > Create a collection

Collections must be created with a name before adding objects to Answers which automatically detects properties and data types based on indexed objects supporting string and list of strings formats.

Answers > Objects

Objects in Answers function as indexed records that utilize either custom string IDs or auto-generated identifiers without requiring explicit schema definition.