{"id":1601,"date":"2022-01-09T11:18:16","date_gmt":"2022-01-09T11:18:16","guid":{"rendered":"https:\/\/multisite.korebots.com\/SearchAssist\/?p=1601"},"modified":"2022-02-14T10:47:44","modified_gmt":"2022-02-14T10:47:44","slug":"how-to-map-fields-in-the-workbench","status":"publish","type":"post","link":"https:\/\/multisite.korebots.com\/SearchAssist\/concepts\/managing-indices\/how-to-map-fields-in-the-workbench\/","title":{"rendered":"Mapping Fields in the Workbench"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">The Field Mapping stage in <\/span><a href=\"https:\/\/docs.google.com\/document\/d\/1A1G6RzvrbxqNQtagGPWiBYSm2sIZaKiB\/edit#bookmark=id.endjhwj5b953\"><span style=\"font-weight: 400;\">Indexing Pipeline<\/span><\/a><span style=\"font-weight: 400;\">\u00a0 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 style=\"font-weight: 400;\"><b>Set <\/b><span style=\"font-weight: 400;\">a field value, <\/span><b>Rename <\/b><span style=\"font-weight: 400;\">a field, <\/span><b>Copy <\/b><span style=\"font-weight: 400;\">one field to another, or <\/span><b>Remove <\/b><span style=\"font-weight: 400;\">a field.<\/span><\/li>\n<li style=\"font-weight: 400;\"><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 style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Re-order or delete a <\/span><b>Field Mapping<\/b><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Simulate to test the changes before saving them.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Ensure to click <\/span><b>Train your App <\/b><span style=\"font-weight: 400;\">each time you make changes to any index configuration.\u00a0<\/span><span style=\"font-weight: 400;\">This builds the index based on the updated configurations.<a ref=\"magnificPopup\" href=\"https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2021\/12\/Train_your_App_icon.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1605 size-full\" src=\"https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2021\/12\/Train_your_App_icon.png\" alt=\"\" width=\"460\" height=\"59\" srcset=\"https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2021\/12\/Train_your_App_icon.png 460w, https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2021\/12\/Train_your_App_icon-300x38.png 300w\" sizes=\"(max-width: 460px) 100vw, 460px\" \/><\/a><\/span><\/p>\n<p><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">To configure field mapping, take the following 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 page, on the <\/span><b>Stages <\/b><span style=\"font-weight: 400;\">column, click the <\/span><strong>+<\/strong><span style=\"font-weight: 400;\"> icon.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Select <\/span><b>Field Mapping<\/b><span style=\"font-weight: 400;\"> from the <\/span><b>Stage Type<\/b><span style=\"font-weight: 400;\"> dropdown.<a ref=\"magnificPopup\" href=\"https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2021\/12\/Manage_indices_simulate-field-mapping-stage-type.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1604 size-medium aligncenter\" src=\"https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2021\/12\/Manage_indices_simulate-field-mapping-stage-type-300x248.png\" alt=\"\" width=\"300\" height=\"248\" srcset=\"https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2021\/12\/Manage_indices_simulate-field-mapping-stage-type-300x248.png 300w, https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2021\/12\/Manage_indices_simulate-field-mapping-stage-type.png 532w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/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.<a ref=\"magnificPopup\" href=\"https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2021\/12\/Manage_indices_simulate-field-mapping.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1602 size-large\" src=\"https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2021\/12\/Manage_indices_simulate-field-mapping-1024x313.png\" alt=\"\" width=\"640\" height=\"196\" srcset=\"https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2021\/12\/Manage_indices_simulate-field-mapping-1024x313.png 1024w, https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2021\/12\/Manage_indices_simulate-field-mapping-300x92.png 300w, https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2021\/12\/Manage_indices_simulate-field-mapping.png 1650w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/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. Add multiple conditions using AND\/OR connectors. SearchAssist considers the documents that satisfy the conditions as part of the stage.\u00a0<\/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;\">dropdown. See the following <\/span><span style=\"font-weight: 400;\">details<\/span><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Click <\/span><b>Simulate<\/b><span style=\"font-weight: 400;\"> 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 and the number of documents if there is no mention in the conditions.\u00a0 <\/span><\/li>\n<li style=\"font-weight: 400;\">Once done, click <b>Save Configuration<\/b> on the top-right. For example, select <b>Set <\/b>from the <b>Actions <\/b>dropdown list; enter <i>Title <\/i>in the<b> Field Name<\/b> field and enter <i>Heading <\/i>in the <b>Value <\/b>field. Click <b>Simulate <\/b>to verify if the field value is changed. Perform associated <strong>Actions<\/strong> to:\n<ul>\n<li style=\"font-weight: 400;\"><b>Set<\/b><span style=\"font-weight: 400;\"> 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;\">.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\"><b>Rename<\/b><span style=\"font-weight: 400;\"> to 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;\"><b>Copy<\/b><span style=\"font-weight: 400;\"> 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;\"><b>Remove<\/b><span style=\"font-weight: 400;\">\u00a0 the <\/span><i><span style=\"font-weight: 400;\">Field Name<\/span><\/i><span style=\"font-weight: 400;\">. <\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400;\">Use the handlebar to reorder the action sequence as required.<\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\"><a ref=\"magnificPopup\" href=\"https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2021\/12\/Manage_indices_Simulate_fields-handlebar.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1603 size-large\" src=\"https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2021\/12\/Manage_indices_Simulate_fields-handlebar-1024x197.png\" alt=\"\" width=\"640\" height=\"123\" srcset=\"https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2021\/12\/Manage_indices_Simulate_fields-handlebar-1024x197.png 1024w, https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2021\/12\/Manage_indices_Simulate_fields-handlebar-300x58.png 300w, https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2021\/12\/Manage_indices_Simulate_fields-handlebar.png 1396w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Conditions:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Condition is of the following format: <\/span><span style=\"font-weight: 400;\">ctx.fieldtype==value<\/span><span style=\"font-weight: 400;\"> or <\/span><span style=\"font-weight: 400;\">ctx.fieldtype!=value<\/span><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">For example, <\/span><span style=\"font-weight: 400;\">ctx.contentType==&#8221;web&#8221;<\/span><span style=\"font-weight: 400;\"> to restrict the mapping to content from a web source<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Field Mapping stage in Indexing Pipeline\u00a0 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, or Remove a field. Define a condition for the field mapping stage. The field mapping actions occur on the documents&#8230;<\/p>\n","protected":false},"author":18,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[82,81],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/posts\/1601"}],"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\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/comments?post=1601"}],"version-history":[{"count":11,"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/posts\/1601\/revisions"}],"predecessor-version":[{"id":3008,"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/posts\/1601\/revisions\/3008"}],"wp:attachment":[{"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/media?parent=1601"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/categories?post=1601"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/tags?post=1601"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}