Skip to content

RP-13: Design Elasticsearch indexing strategy#10

Merged
b17saurabh merged 1 commit into
mainfrom
RP-13/design-elasticsearch-indexing-strategy
Jun 13, 2026
Merged

RP-13: Design Elasticsearch indexing strategy#10
b17saurabh merged 1 commit into
mainfrom
RP-13/design-elasticsearch-indexing-strategy

Conversation

@b17saurabh

Copy link
Copy Markdown
Contributor

feat: design elasticsearch indexing strategy and logstore adapter

…ices and ILM lifecycle

Index strategy:
  - Daily rolling indices: rp-tl-{yyyy.MM.dd}
  - Index template with strict mappings (keyword, text, date, flattened)
  - ILM policy: hot (1d/50GB) -> warm (7d) -> cold (30d) -> delete (90d)

Adapter:
  - ElasticsearchLogStore implementing LogStore (write, write_batch,
    query, count, health)
  - ElasticsearchConfig model with sensible defaults
  - Bootstrap creates ILM policy and index template on startup

Interface:
  - LogFilter extended with offset, sort_order, query_string
  - LogStore interface gains write_batch() and count()

Dependencies:
  - elasticsearch>=8.15,<9 added to pyproject.toml and
    ingestion-service requirements

Documentation:
  - docs/elasticsearch-indexing.md: naming, mappings, query patterns,
    retention, future considerations

Tests: 37 unit tests covering naming, query building, lifecycle, CRUD
@b17saurabh b17saurabh force-pushed the RP-13/design-elasticsearch-indexing-strategy branch from 893a7a8 to a2a1fdb Compare June 13, 2026 11:48
@b17saurabh b17saurabh merged commit f1bc1ed into main Jun 13, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant