Korrektes Mapping ist entscheidend für eine effiziente Suche.
Typen¶
- text — Volltext
- keyword — Exact Match, Aggregationen
- integer/float
- date
- nested
- geo_point
Mapping¶
PUT /articles
{
"mappings": {
"properties": {
"title": {"type":"text","analyzer":"german"},
"slug": {"type":"keyword"},
"tags": {"type":"keyword"},
"published_at": {"type":"date"}
}
}
}
Mapping = Grundlage¶
Explizit definieren. Dynamic = nur für Prototypen.
elasticsearchmappingschema