The Indexing API loads documents into Elasticsearch. It supports individual document operations, while related multi-document APIs handle batch imports such as a product catalog. section 5.0
Use document APIs according to the operation and scale:
- Index documents individually for events such as e-commerce orders or tweets. section 5.0
- Use the bulk endpoint for batch imports, such as moving millions of product records from a database into Elasticsearch. section 5.0
- Combine indexing with read/search, update, delete, and reindexing APIs when managing a document store. section 5.0
Loading a product catalog
A product catalog stored in a database can be imported into Elasticsearch to enable product search. Individual records can be indexed one at a time; millions of records are better handled through the _bulk endpoint. section 5.0
Table 4.1 Common data types with examples (view table figure)
Choose field types deliberately when defining the index schema: text supports unstructured text, keyword preserves structured text, numeric types represent numbers, and object represents JSON objects. section 4.4
