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

Single objects can be indexed through a dedicated endpoint while bulk indexing is recommended for multiple objects to optimize performance and efficiency.

Answers > Collections

Objects in Answers are organized into collections which act as database-like structures for grouping and managing similar records with unique identifiers.

Collections > Create a collection

Collections in Answers organize objects with similar fields, functioning like database tables and supporting string and string list data types for indexing records.

Answers > Objects

Objects in Answers are indexed records with either custom string IDs or auto-generated identifiers, forming the basic data units within collections.