AI Hints
Home›Elasticsearch Tutorial›RAG, Ingest Pipelines and Runtime Fields
Elasticsearch · Lesson 104 of 120

Ingest Pipelines

Clean data on the way in.

⏱ 2 min read▶ Video at 1:38:02🎓 Free
Watch this lesson in the Elasticsearch courseWatch on YouTube ↗Full Elasticsearch course

Product data arrives messy. Brand names in random case, extra spaces, missing fields. An ingest pipeline fixes each document before it's stored.

  • Messy data
  • Fix on the way in
  • Ingest pipeline

A cleaning pipeline

The pipeline has processors that run in order. Trim removes spaces, and uppercase fixes the brand. Set adds a field with the time it arrived. We index a messy document through the pipeline. Run it. The stored document is clean.

Dev Tools Consoletext
PUT _ingest/pipeline/clean?filter_path=acknowledged
{ "processors": [
    { "trim":      { "field": "brand" } },
    { "uppercase": { "field": "brand" } },
    { "set": { "field": "loaded_at", "value": "{{_ingest.timestamp}}" } } ] }

PUT products/_doc/1?pipeline=clean&refresh=true&filter_path=result
{ "name": "Trail Mug", "brand": "  trailco " }

GET products/_doc/1?filter_path=_source
Output
# PUT _ingest/pipeline/clean 200 OK
{"acknowledged": true}

# PUT products/_doc/1 201 Created
{"result": "created"}

# GET products/_doc/1 200 OK
{
  "_source": {
    "name": "Trail Mug",
    "brand": "TRAILCO",
    "loaded_at": "2026-11-15T08:14:32.114343679Z"
  }
}

Useful processors

Rename and remove tidy fields. Convert changes types. Grok and dissect split log lines into fields. Date parses dates. And a default pipeline on an index runs for every document automatically.

keyvalue
rename / removetidy fields
convertchange types
grok / dissectparse logs
default_pipelineruns every time

Summary

Ingest pipelines run processors on each document before it's stored, to clean and enrich it. Next, fields calculated at search time.

Key takeaways
  • processors
  • ?pipeline=
  • Clean data
Next up: Runtime Fields — fields made at query time