{"id":128,"date":"2021-01-19T10:08:40","date_gmt":"2021-01-19T10:08:40","guid":{"rendered":"https:\/\/multisite.korebots.com\/SearchAssist\/?p=128"},"modified":"2021-06-28T07:43:19","modified_gmt":"2021-06-28T07:43:19","slug":"field-mapping","status":"publish","type":"post","link":"https:\/\/multisite.korebots.com\/SearchAssist\/manage-index\/field-mapping\/","title":{"rendered":"Field Mapping"},"content":{"rendered":"<section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row via_grid cols_1 laptops-cols_inherit tablets-cols_inherit mobiles-cols_1 valign_top type_default stacking_default\"><div class=\"wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_text_column\"><div class=\"wpb_wrapper\"><p><span style=\"font-weight: 400;\">The Field Mapping stage in <a href=\"\/SearchAssist\/lifecycle\/manage-index\/workbench\/\" target=\"_blank\" rel=\"noopener noreferrer\">Index Pipeline<\/a> is used to map fields in an index pipeline document to a target field. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">You can:<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">Set a field value, Rename a field, Copy one field to another, and Remove a field.<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Define a condition for the field mapping stage. The field mapping actions occur on the documents that satisfy the given condition.<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Re-order or delete a field mapping.<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Simulate the changes before saving them.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Ensure to <strong>Train your app<\/strong> each time you make changes to any index configuration. This builds the index based on the updated configurations.<\/span><\/p>\n<\/div><\/div><div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div><div class=\"wpb_text_column\"><div class=\"wpb_wrapper\"><h2><span class=\"ez-toc-section\" id=\"Configuration\"><\/span>Configuration<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">To configure field mapping, follow the below steps:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Click the <\/span><b>Indices <\/b><span style=\"font-weight: 400;\">tab on the top.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">On the left pane, under the <\/span><b>Index Configuration<\/b><span style=\"font-weight: 400;\"> section, click <\/span><b>Workbench<\/b><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">On the Workbench (Index Configuration) page, on the <\/span><b>Stages <\/b><span style=\"font-weight: 400;\">column, click the <\/span><b>+<\/b><span style=\"font-weight: 400;\"> icon.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">On the right column, select <\/span><b>Field Mapping<\/b><span style=\"font-weight: 400;\"> from the <\/span><b>Stage Type<\/b><span style=\"font-weight: 400;\"> drop-down list.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Enter a name in the <\/span><b>Stage Name<\/b><span style=\"font-weight: 400;\"> field.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Enter a condition in the <\/span><b>Condition <\/b><span style=\"font-weight: 400;\">field. You can add multiple conditions using AND\/OR connectors. Documents that satisfy the condition are executed as part of the stage. <a href=\"#Conditions\">See below for details<\/a>.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Select an action from the <\/span><b>Action <\/b><span style=\"font-weight: 400;\">drop-down list. <a href=\"#Actions\">See below for details<\/a>.<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Click <\/span><b>Simulate<\/b> to verify the configurations. The simulator displays the Source and the number of documents to which the mapping was applied, and the result. You can change the Source (if not mentioned in the condition) and the number of documents.<\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Once done, click <\/span><b>Save Configuration<\/b><span style=\"font-weight: 400;\"> on the top-right.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\"><a ref=\"magnificPopup\" href=\"http:\/\/docs.kore.ai\/searchassist\/wp-content\/uploads\/sites\/4\/2021\/01\/indices_field.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1265\" src=\"http:\/\/docs.kore.ai\/searchassist\/wp-content\/uploads\/sites\/4\/2021\/01\/indices_field.png\" alt=\"\" width=\"1123\" height=\"709\" \/><\/a><\/span><\/p>\n<p><span style=\"font-weight: 400;\">For example, select <\/span><b>Set <\/b><span style=\"font-weight: 400;\">from the <\/span><b>Actions <\/b><span style=\"font-weight: 400;\">drop-down list; enter <\/span><i><span style=\"font-weight: 400;\">Title <\/span><\/i><span style=\"font-weight: 400;\">in the<\/span><b> Field Name<\/b><span style=\"font-weight: 400;\"> field and enter <\/span><i><span style=\"font-weight: 400;\">Heading <\/span><\/i><span style=\"font-weight: 400;\">in the <\/span><b>Value <\/b><span style=\"font-weight: 400;\">field. Click <\/span><b>Simulate <\/b><span style=\"font-weight: 400;\">to verify if the field value is changed.<\/span><\/p>\n<\/div><\/div><div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div><div class=\"wpb_text_column\"><div class=\"wpb_wrapper\"><h3><span class=\"ez-toc-section\" id=\"Actions\"><\/span>Actions<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">This stage supports actions like Set, Rename, Copy, and Remove.\u00a0<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"><strong>Set<\/strong> &#8211; This allows you to set a <\/span><i><span style=\"font-weight: 400;\">Value <\/span><\/i><span style=\"font-weight: 400;\">for the <\/span><i><span style=\"font-weight: 400;\">Field Name<\/span><\/i><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"><strong>Rename<\/strong> &#8211; This allows you to set a <\/span><i><span style=\"font-weight: 400;\">New Name<\/span><\/i><span style=\"font-weight: 400;\"> for the<\/span><i><span style=\"font-weight: 400;\"> Field Name<\/span><\/i><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"><strong>Copy<\/strong> &#8211; This allows you to copy the <\/span><i><span style=\"font-weight: 400;\">Source Field<\/span><\/i><span style=\"font-weight: 400;\"> to the <\/span><i><span style=\"font-weight: 400;\">Target Field<\/span><\/i><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"><strong>Remove<\/strong> &#8211; This allows you to remove the <\/span><i><span style=\"font-weight: 400;\">Field Name<\/span><\/i><span style=\"font-weight: 400;\">.<\/span><\/li>\n<\/ul>\n<p>You can use the handlebar to reorder the action sequence.<\/p>\n<p><a ref=\"magnificPopup\" href=\"http:\/\/docs.kore.ai\/searchassist\/wp-content\/uploads\/sites\/4\/2021\/01\/indices_fieldAction.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1263\" src=\"http:\/\/docs.kore.ai\/searchassist\/wp-content\/uploads\/sites\/4\/2021\/01\/indices_fieldAction.png\" alt=\"\" width=\"855\" height=\"248\" \/><\/a><\/p>\n<\/div><\/div><div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div><div class=\"wpb_text_column\"><div class=\"wpb_wrapper\"><h3><span class=\"ez-toc-section\" id=\"Conditions\"><\/span>Conditions<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Condition is of the following format: <code>ctx.fieldtype==value<\/code> or <code>ctx.fieldtype!=value<\/code>.<\/p>\n<p>For example, <code>ctx.contentType==\"web\"<\/code> to restrict the mapping to content from a web source.<\/p>\n<\/div><\/div><div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>[vc_raw_html]JTNDZGl2JTIwY2xhc3MlM0QlMjJ3LXBvc3QtZWxtJTIwcG9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9uYXZpZ2F0aW9uLWl0ZW0tdGl0bGUlMjIlM0UlM0NzcGFuJTNFS2V5d29yZCUyMEV4dHJhY3Rpb24lM0MlMkZzcGFuJTNFJTNDJTJGZGl2JTNFJTBBJTNDcCUzRSUzQyUyRmElM0UlM0MlMkZkaXYlM0UlMEE=[\/vc_raw_html]<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"The Field Mapping stage in Index Pipeline is used to map fields in an index pipeline document to a target field. You can: Set a field value, Rename a field, Copy one field to another, and Remove a field. Define a condition for the field mapping stage. The field mapping actions occur on the documents...","protected":false},"author":12,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/posts\/128"}],"collection":[{"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/comments?post=128"}],"version-history":[{"count":19,"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/posts\/128\/revisions"}],"predecessor-version":[{"id":1218,"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/posts\/128\/revisions\/1218"}],"wp:attachment":[{"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/media?parent=128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/categories?post=128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/tags?post=128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}