Skip to content

Commit

Permalink
Add document limits to index and bulk pages (opensearch-project#4537)
Browse files Browse the repository at this point in the history
* Add document limits to index and buld pages

Signed-off-by: Naarcha-AWS <naarcha@amazon.com>

* Apply suggestions from code review

Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com>

* Apply suggestions from code review

Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Nathan Bower <nbower@amazon.com>
Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com>

---------

Signed-off-by: Naarcha-AWS <naarcha@amazon.com>
Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com>
Co-authored-by: Nathan Bower <nbower@amazon.com>
  • Loading branch information
2 people authored and harshavamsi committed Oct 31, 2023
1 parent 5c0c4d7 commit da5f0bb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions _api-reference/document-apis/bulk.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Introduced 1.0
The bulk operation lets you add, update, or delete multiple documents in a single request. Compared to individual OpenSearch indexing requests, the bulk operation has significant performance benefits. Whenever practical, we recommend batching indexing operations into bulk requests.


Beginning in OpenSearch 2.9, when indexing documents using the bulk operation, the document `_id` must be 512 MB or less in size.
{: .note}

## Example

```json
Expand Down
4 changes: 4 additions & 0 deletions _im-plugin/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ You index data using the OpenSearch REST API. Two APIs exist: the index API and

For situations in which new data arrives incrementally (for example, customer orders from a small business), you might use the index API to add documents individually as they arrive. For situations in which the flow of data is less frequent (for example, weekly updates to a marketing website), you might prefer to generate a file and send it to the `_bulk` API. For large numbers of documents, lumping requests together and using the `_bulk` API offers superior performance. If your documents are enormous, however, you might need to index them individually.

When indexing documents, the document `_id` must be 512 MB or less in size.


## Introduction to indexing

Expand Down Expand Up @@ -91,6 +93,8 @@ OpenSearch indexes have the following naming restrictions:

`:`, `"`, `*`, `+`, `/`, `\`, `|`, `?`, `#`, `>`, or `<`



## Read data

After you index a document, you can retrieve it by sending a GET request to the same endpoint that you used for indexing:
Expand Down

0 comments on commit da5f0bb

Please sign in to comment.