Cursor rule
.cursor/rules/elasticsearch-mapping.mdcElasticsearch index mapping and indexing constraints
Cursor rules
Quality
58/100
Scores the file, not the repository.Length
274 words
4 headings · 0 code blocksRepository
0
— · pushed 54 days agoLast changed
3 days ago
First indexed 3 days ago.1234567# Elasticsearch Mapping & Indexing89ES is a **derived, rebuildable mirror** of Mongo — never the source of truth.10The explicit mapping is intentional; document any change in `ARCHITECTURE.md §6`.1112## Mapping is immutable — changes require a reindex1314A field's mapping type cannot change on an existing index. Editing `_MAPPING`15only affects newly created indices, so any type change means: create a new16index with the new mapping and reindex from Mongo (the outbox is the source).17Call this out explicitly in the PR/commit and the architecture doc.1819## Field-type conventions (don't drift)2021- Exact-match / aggregatable fields (`event_type`, `user_id`) → `keyword`.22- `schema_version` → `integer` (producer-declared event schema version).23- `source_url` → `keyword` with a `text` sub-field for tokenized search.24- `metadata` → `flattened`: schemaless keys can't explode the mapping and mixed25 value types across events can't cause index-time conflicts. The trade-off is26 that `flattened` leaves are exact-match keyword, not analyzed full-text — which27 is why metadata values are *also* mirrored into `metadata_text` (below).28- `metadata_text` → `text` (analyzed). Derived at index time from the metadata29 leaf values and included in the `/search?q=` query, so full-text search hits30 terms that appear only inside metadata. Search-only: excluded from `/search`31 responses (`source_excludes`) and never stored in Mongo (ARCHITECTURE §6).3233## Indexing must tolerate partial failure3435`ensure_mapping()` is idempotent and may run lazily (ES can be down at startup).36Bulk index with `raise_on_error=False` so one malformed document doesn't discard37the rest of the batch; log the failures. A transport-level error (ES38unreachable) **should** propagate so the `EsIndexer` leaves events unindexed and39retries them next pass — that's the outbox guarantee, not a bug to swallow.40
Also in jleist-clemson/acheron
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| jleist-clemson/acheron.cursor/rules/api-routes.mdc · 0 | Cursor rules | styleapi | 57/100 | 3 days ago | |
| jleist-clemson/acheron.cursor/rules/background-tasks.mdc · 0 | Cursor rules | monorepo | 58/100 | 3 days ago | |
| jleist-clemson/acheron.cursor/rules/python-standards.mdc · 0 | Cursor rules | lint-formatapido-notdocs | 72/100 | 3 days ago | |
| jleist-clemson/acheron.cursor/rules/testing.mdc · 0 | Cursor rules | testlint-formatstyletesting-strategy | 67/100 | 3 days ago | |
| jleist-clemson/acheronAGENTS.md · 0 | AGENTS.md | testlint-formatstyledo-not+2 | 63/100 | 3 days ago | |
| jleist-clemson/acheronCLAUDE.md · 0 | CLAUDE.md | agent-behaviour | 16/100 | 3 days ago |
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 3 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 3 days ago | |
| nerds-odd-e/doughnut.cursor/rules/cli.mdc · 49 | Cursor rules | setupbuildteststyle+4 | 96/100 | 3 days ago | |
| pr-pm/prpm.cursor/rules/github-actions-testing.mdc · 121 | Cursor rules | setupbuildstylearch+4 | 93/100 | 3 days ago | |
| pr-pm/prpm.cursor/rules/creating-agents-md.mdc · 121 | Cursor rules | testlint-formatstylearch+7 | 92/100 | 3 days ago | |
| coollabsio/coolify.cursor/rules/coolify-ai-docs.mdc · 60k | Cursor rules | buildteststylearch+5 | 92/100 | 3 days ago | |
| iloveitaly/llm-ide-rules.cursor/rules/general.mdc · 13 | Cursor rules | teststyledo-notagent-behaviour+1 | 92/100 | 3 days ago |
