From 15c0d1a24ea922db59d70405a2ad6d7398d74d87 Mon Sep 17 00:00:00 2001
From: AMIT KUMAR <amit.kumar@tarento.com>
Date: Mon, 25 Oct 2021 13:25:50 +0530
Subject: [PATCH] Sb 26823 ingest pipeline for user (#2986)

---
 .../files/pipelines/userv3-ingest-pipeline.json       | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 ansible/roles/es-mapping/files/pipelines/userv3-ingest-pipeline.json

diff --git a/ansible/roles/es-mapping/files/pipelines/userv3-ingest-pipeline.json b/ansible/roles/es-mapping/files/pipelines/userv3-ingest-pipeline.json
new file mode 100644
index 000000000..3052a0a2a
--- /dev/null
+++ b/ansible/roles/es-mapping/files/pipelines/userv3-ingest-pipeline.json
@@ -0,0 +1,11 @@
+{
+  "description": "This Pipeline Will copy profileUserType Map<String,String> to profileUserTypes i.e List<Map<String,String>>",
+  "processors": [
+    {
+      "script": {
+        "lang": "painless",
+        "source": "\nif (ctx.profileUserType != null){\nArrayList tags = new ArrayList();\ntags.add(ctx.profileUserType);\nctx.profileUserTypes = tags;}\nelse{\nArrayList tags = new ArrayList();\nctx.profileUserTypes = tags;}"
+      }
+    }
+  ]
+}
\ No newline at end of file
-- 
GitLab