Skip to content

Commit 2943dd9

Browse files
committed
Adding documentation for append only indices
Signed-off-by: RS146BIJAY <[email protected]>
1 parent 43f3450 commit 2943dd9

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

_im-plugin/append-only-index.md

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
layout: default
3+
title: Append-only Index
4+
nav_order: 14
5+
redirect_from:
6+
- /opensearch/append-only-index/
7+
---
8+
9+
# Append only index
10+
11+
An append-only index is an immutable index that only allows document ingestion (appending) while blocking all forms of updates or deletions after initial document creation.
12+
When you enable the append-only setting for an index, OpenSearch prevents any modifications to existing documents. You can only add new documents to the index.
13+
14+
When an index is configured as append-only, the following operations will return an error:
15+
- Document update call (Update API)
16+
- Document delete call (Delete API)
17+
- Update by query call
18+
- Delete by query call
19+
- Bulk API call that include update, delete, or upsert actions
20+
- Bulk API call with an index action with a custom document ID.
21+
22+
Append-only indices offer several advantages:
23+
- Optimised performance as it eliminates costly updates/delete operations.
24+
- Optimised storage and segment merges as it eliminate soft deletes or version tracking.
25+
- Enables future optimisations like auto-rollovers and efficient warm tiering.
26+
27+
Ideal use cases of append only indices are immutable workloads like logs, metrics, observability or security event data where we do not modify data once ingested.
28+
29+
30+
## Example usage
31+
32+
The following example request creates a new index named `my-append-only-index` which has all forms of updates disabled on it:
33+
34+
```json
35+
PUT /my-append-only-index
36+
{
37+
"settings": {
38+
"index.append_only.enabled": true
39+
}
40+
}
41+
```
42+
{% include copy-curl.html %}

_install-and-configure/configuring-opensearch/index-settings.md

+2
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ For `zstd`, `zstd_no_dict`, `qat_lz4`, and `qat_deflate`, you can specify the co
160160

161161
- `index.use_compound_file` (Boolean): This setting controls the Apache Lucene `useCompoundFile` index writer settings, which specifies whether newly written segment files will be packed into a compound file. Default is `true`.
162162

163+
- `index.append_only.enabled` (Boolean): This setting enabled for indices on which we want to prevent any forms of updates. Default is `false`.
164+
163165
### Updating a static index setting
164166

165167
You can update a static index setting only on a closed index. The following example demonstrates updating the index codec setting.

0 commit comments

Comments
 (0)