Skip to content
_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN DE
Let's talk

Elasticsearch Mapping

25. 11. 2025 Updated: 27. 03. 2026 1 min read intermediate

Proper mapping is key for efficient search.

Types

  • text — full-text
  • keyword — exact match, aggregations
  • integer/float
  • date
  • nested
  • geo_point

Mapping

PUT /articles
{
  "mappings": {
    "properties": {
      "title": {"type":"text","analyzer":"english"},
      "slug": {"type":"keyword"},
      "tags": {"type":"keyword"},
      "published_at": {"type":"date"}
    }
  }
}

Mapping Best Practices

When designing a mapping, always use the keyword type for fields you filter or aggregate on (tags, statuses, identifiers). Use the text type only for fields where you need full-text search. For fields like titles where you need both, use multi-field mapping with both text and keyword subtypes.

Watch out for mapping explosion — if you dynamically add hundreds of new fields, Elasticsearch will consume large amounts of memory on metadata. Set dynamic to strict or false for production indexes. For localized data, use an analyzer with the appropriate language stemmer and stop words, which significantly improves the relevance of search results.

Mapping = Foundation

Define explicitly. Dynamic = prototypes only.

elasticsearchmappingschema
Share:

CORE SYSTEMS team

We build core systems and AI agents that keep operations running. 15 years of experience with enterprise IT.