Enrich processor debug statements

I am using enrich processor with ingest pipeline. The enrichment works when I simulate the pipeline but fails when ingesting a doc.
How can I debug what is going wrong? Verified that the Pipeline is indeed been invoked as the failure condition is set.

Enrich policy definition :

 PUT /_enrich/policy/my-enrich_policy
   {
         "match": {
            "indices": "master-index",
            "match_field": "customer_prefix",
            "enrich_fields": ["country", "geo"]
          }
   }       

PUT /_enrich/policy/my-enrich_policy/_execute

Pipeline definition:

PUT /_ingest/pipeline/enrich_pipeline
{
  "description": "Enrich country ",
  "processors": [
    {
      "lowercase": {
        "field": "customer_prefix"
      }
    },
    {
      "enrich": {
        "policy_name": "my-enrich_policy",
        "field": "customer_prefix",
        "target_field": "enriched",
        "on_failure": [
          {
            "set": {
              "field": "enriched",
              "value": "false"
            }
          }
        ]
      }
    }
  ]
}

Hi @sulsulatoff

One thing to note is _simluate does not actually index a document, it just transforms the data so if you have a mapping issue that can cause the document to not be actually indexed even if the pipeline / enrich works.

I have run into this before... so perhaps actually try to index a document from the Dev Tools and see what you see.

POST my-index/_doc?pipeline=enrich_pipeline
{
  "@timestamp": "2099-03-07T11:04:05.000Z",
  "my-keyword-field": "foo"
  "..."
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.