elasticsearch/docs/reference/ingest
Pete Gillin 6ec7a3439d
Add a terminate ingest processor (#114157) (#114343)
This processor simply causes any remaining processors in the pipeline
to be skipped. It will normally be executed conditionally using the
`if` option. (If this pipeline is being called from another pipeline,
the calling pipeline is *not* terminated.)

For example, this:

```
POST /_ingest/pipeline/_simulate
{
  "pipeline":
  {
    "description": "Appends just 'before' to the steps field if the number field
 is present, or both 'before' and 'after' if not",
    "processors": [
      {
        "append": {
          "field": "steps",
          "value": "before"
        }
      },
      {
        "terminate": {
          "if": "ctx.error != null"
        }
      },
      {
        "append": {
          "field": "steps",
          "value": "after"
        }
      }
    ]
  },
  "docs": [
    {
      "_index": "index",
      "_id": "doc1",
      "_source": {
        "name": "okay",
        "steps": []
      }
    },
    {
      "_index": "index",
      "_id": "doc2",
      "_source": {
        "name": "bad",
        "error": "oh no",
        "steps": []
      }
    }
  ]
}
```

returns something like this:

```
{
  "docs": [
    {
      "doc": {
        "_index": "index",
        "_version": "-3",
        "_id": "doc1",
        "_source": {
          "name": "okay",
          "steps": [
            "before",
            "after"
          ]
        },
        "_ingest": {
          "timestamp": "2024-10-04T16:25:20.448881Z"
        }
      }
    },
    {
      "doc": {
        "_index": "index",
        "_version": "-3",
        "_id": "doc2",
        "_source": {
          "name": "bad",
          "error": "oh no",
          "steps": [
            "before"
          ]
        },
        "_ingest": {
          "timestamp": "2024-10-04T16:25:20.448932Z"
        }
      }
    }
  ]
}
```
2024-10-09 16:44:57 +01:00
..
apis Adding index_template_substitutions to the simulate ingest API (#114128) (#114374) 2024-10-09 13:04:23 +11:00
processors Add a terminate ingest processor (#114157) (#114343) 2024-10-09 16:44:57 +01:00
common-log-format-example.asciidoc Use deprecation logger for CLDR date format specifiers (#112917) 2024-09-19 15:50:37 +01:00
enrich.asciidoc Make enrich cache based on memory usage (#111412) 2024-08-23 09:26:55 +02:00
geo-match-enrich-policy-type-ex.asciidoc [DOCS] Improve enrich policy execute 'wait_for_completion' docs (#102291) 2023-11-27 17:17:06 +01:00
match-enrich-policy-type-ex.asciidoc [DOCS] Improve enrich policy execute 'wait_for_completion' docs (#102291) 2023-11-27 17:17:06 +01:00
processors.asciidoc [DOCS] Ingest processors docs improvements (#104384) 2024-01-17 11:50:29 +01:00
range-enrich-policy-type-ex.asciidoc [DOCS] Improve enrich policy execute 'wait_for_completion' docs (#102291) 2023-11-27 17:17:06 +01:00
search-inference-processing.asciidoc [Docs] [Enterprise Search] ML inference pipeline documentation updates (#103022) 2024-01-02 09:56:50 -05:00
search-ingest-pipelines.asciidoc [DOCS] Port connector docs from Enterprise Search guide (#112953) (#113771) 2024-09-30 19:01:25 +10:00
search-nlp-tutorial.asciidoc Pass over Sparse Vector docs for correctness (#110282) 2024-07-02 13:37:25 -04:00