2.4 KiB
2.4 KiB
Elasticsearch Indexing Plan
Status: Draft Scope: Minimal phased ES deployment aligned with indexing contract.
Phase A — Artifact Metadata Projection (Minimal)
Goal
Accelerate search and metadata filtering only.
Index Name
amduat_artifacts_v1
Document Structure
_id: canonicalReferenceByteshex.reference: canonical hex.projection_schema_version: integer.kind: keyword.enc_profile: keyword.labels: keyword array.created_at: date, only if intrinsic to artifact.text: text, optional, deterministic extractor.extractor_version: keyword, iftextpresent.
Data Source
- ASL authoritative log/index.
- Deterministic decoding only.
Query Patterns Accelerated
- Text search.
- Filter by kind.
- Filter by labels.
- Narrow candidate set.
Verification Rule
All returned References MUST be confirmed via ASL/1-STORE before returning artifact data.
Phase B — Edge Projection (Optional)
Goal
Accelerate candidate neighbor discovery.
Index Name
amduat_edges_v1
Document Structure
_id: edge Reference hex.edge_reference: canonical hex.src_ref: canonical hex.dst_ref: canonical hex.edge_label: keyword.hash_id: keyword or numeric.digest: keyword.projection_schema_version: integer.
Data Source
- EdgeArtifacts only.
- TGK profile rules.
- No inferred edges.
Verification Rule
Returned edges MUST be validated via TGK/STORE/1 authoritative query, and canonical ordering MUST be applied before client response.
Phase C — Enterprise Projection Hardening
Additions
- Projection checkpoint artifacts stored in ASL.
- Schema version recorded in checkpoint.
- Full rebuild test automation.
- Lag metrics published.
- Projection audit job comparing snapshot vs ES.
Operational Guarantees
- ES may be disabled without breaking semantics.
- Projection rebuild must be deterministic.
- Schema changes require replay.
- Checkpoint artifact defines replay boundary.
Observability Requirements
Expose:
- ASL head log position.
- Indexer checkpoint position.
- Computed lag.
- Projection error counts.
- Rebuild duration.
- Verification fallback rate.
Final Guardrail
Elasticsearch accelerates discovery.
Authoritative semantics remain in ASL/1-STORE and TGK/STORE/1.
Ordering, identity, and correctness are never delegated to ES.