-
There is no API to do so in Quickwit 0.8. |
Beta Was this translation helpful? Give feedback.
Answered by
guilload
Oct 22, 2024
Replies: 1 comment 2 replies
-
The API for updating the retention policy will be available in Quickwit 0.9. For versions 0.8 and below, you can manually update the retention policy by editing the metastore file (if using a file-backed metastore) or running a SQL query (if using PostgreSQL). File-backed metastore
"retention": {
"period": "30 days",
"schedule": "daily"
}
PostgreSQLSimply run this SQL query with your desired retention settings, and the janitor will apply the changes within the next 10 minutes. UPDATE indexes
SET index_metadata_json = jsonb_set(
index_metadata_json::jsonb,
'{index_config,retention}',
'{"period": "30 days", "schedule": "daily"}'::jsonb,
true
)::text
WHERE indexes.index_id = '<index ID>'
; |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
guilload
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The API for updating the retention policy will be available in Quickwit 0.9. For versions 0.8 and below, you can manually update the retention policy by editing the metastore file (if using a file-backed metastore) or running a SQL query (if using PostgreSQL).
File-backed metastore
<metastore URI>/<index ID>/metastore.json
.index.index_config.retention
section.period
to the desired retention duration.retention
object is missing or set tonull
, you can create it with the following structure: