{"id":133,"date":"2021-01-19T10:25:17","date_gmt":"2021-01-19T10:25:17","guid":{"rendered":"https:\/\/multisite.korebots.com\/SearchAssist\/?p=133"},"modified":"2021-06-28T07:44:33","modified_gmt":"2021-06-28T07:44:33","slug":"traits-extraction","status":"publish","type":"post","link":"https:\/\/multisite.korebots.com\/SearchAssist\/manage-index\/traits-extraction\/","title":{"rendered":"Traits Extraction"},"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 Traits Extraction stage in <a href=\"\/SearchAssist\/lifecycle\/manage-index\/workbench\/\" target=\"_blank\" rel=\"noopener noreferrer\">Index Pipeline<\/a> extracts specific attributes, or details that the search users express in their conversations. SearchAssist allows you to identify trait characteristics from a source field and save the identified traits in a target field so that it can be used to detect user intentions better.<\/span><\/p>\n<p>You can:<\/p>\n<ul>\n<li>Add multiple trait groups to be identified from the source field.<\/li>\n<li>Define a condition for the trait extraction stage. The traits are extracted only from the documents that satisfy the given condition.<\/li>\n<li>Re-order or delete trait extractions.<\/li>\n<li>Simulate the changes before saving them.<\/li>\n<\/ul>\n<p>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.<\/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 traits extraction, 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>Traits Extraction<\/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 the AND\/OR connectors. Documents that satisfy the condition will be 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 the field you want to extract traits from as <\/span><b>Source<\/b> <strong>Field<\/strong>.<\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Define where you want to store the extracted trait as <\/span><b>Target<\/b> <strong>Field<\/strong>. This field is created by the application<span style=\"font-weight: 400;\">.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Enter trait groups in the <\/span><b>Add Trait Groups<\/b><span style=\"font-weight: 400;\"> field.<\/span><\/li>\n<li>Click\u00a0<b>Simulate<\/b>\u00a0to verify the configurations. The simulator would display 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>Once done, click\u00a0<b>Save Configuration<\/b>\u00a0on the top-right.<\/li>\n<\/ol>\n<p><a ref=\"magnificPopup\" href=\"http:\/\/docs.kore.ai\/searchassist\/wp-content\/uploads\/sites\/4\/2021\/01\/indices_traits.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1271\" src=\"http:\/\/docs.kore.ai\/searchassist\/wp-content\/uploads\/sites\/4\/2021\/01\/indices_traits.png\" alt=\"\" width=\"1119\" height=\"479\" \/><\/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><span id=\"Conditions\" class=\"ez-toc-section\">Conditions<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Condition is of the following format:\u00a0<code>ctx.fieldtype==value<\/code>\u00a0or\u00a0<code>ctx.fieldtype!=value<\/code>. The\u00a0<em>field_name<\/em>\u00a0can be obtained from the Fields table under Index Configuration.<\/p>\n<p>For example,\u00a0<code>ctx.contentType==\"web\"<\/code> to restrict the extraction to the 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]JTNDZGl2JTIwY2xhc3MlM0QlMjJ3LXBvc3QtZWxtJTIwcG9zdF9uYXZpZ2F0aW9uJTIwbGF5b3V0X3NpbXBsZSUyMGludl9mYWxzZSUyMiUzRSUwQSUwOSUzQ2ElMjBjbGFzcyUzRCUyMnBvc3RfbmF2aWdhdGlvbi1pdGVtJTIwb3JkZXJfZmlyc3QlMjB0b19wcmV2JTIyJTIwaHJlZiUzRCUyMiUyRlNlYXJjaEFzc2lzdCUyRm1hbmFnZS1pbmRleCUyRmtleXdvcmQtZXh0cmFjdGlvbiUyRiUyMiUzRSUzQyUyRnAlM0UlMEElM0NkaXYlMjBjbGFzcyUzRCUyMnBvc3RfbmF2aWdhdGlvbi1pdGVtLWFycm93JTIyJTNFJTNDJTJGZGl2JTNFJTBBJTNDZGl2JTIwY2xhc3MlM0QlMjJwb3N0X25hdmlnYXRpb24taXRlbS1tZXRhJTIyJTNFUHJldmlvdXMlM0MlMkZkaXYlM0UlMEElM0NkaXYlMjBjbGFzcyUzRCUyMnBvc3RfbmF2aWdhdGlvbi1pdGVtLXRpdGxlJTIyJTNFJTNDc3BhbiUzRUtleXdvcmQlMjBFeHRyYWN0aW9uJTNDJTJGc3BhbiUzRSUzQyUyRmRpdiUzRSUwQSUzQ3AlM0UlM0MlMkZhJTNFJTNDYnIlMjAlMkYlM0UlMEElM0NhJTIwY2xhc3MlM0QlMjJwb3N0X25hdmlnYXRpb24taXRlbSUyMG9yZGVyX3NlY29uZCUyMHRvX25leHQlMjIlMjBocmVmJTNEJTIyJTJGU2VhcmNoQXNzaXN0JTJGbWFuYWdlLWluZGV4JTJGZW50aXR5LWV4dHJhY3Rpb24lMkYlMjIlM0UlM0MlMkZwJTNFJTBBJTNDZGl2JTIwY2xhc3MlM0QlMjJwb3N0X25hdmlnYXRpb24taXRlbS1hcnJvdyUyMiUzRSUzQyUyRmRpdiUzRSUwQSUzQ2RpdiUyMGNsYXNzJTNEJTIycG9zdF9uYXZpZ2F0aW9uLWl0ZW0tbWV0YSUyMiUzRU5leHQlM0MlMkZkaXYlM0UlMEElM0NkaXYlMjBjbGFzcyUzRCUyMnBvc3RfbmF2aWdhdGlvbi1pdGVtLXRpdGxlJTIyJTNFJTNDc3BhbiUzRUVudGl0eSUyMEV4dHJhY3Rpb24lM0MlMkZzcGFuJTNFJTNDJTJGZGl2JTNFJTBBJTNDcCUzRSUzQyUyRmElM0UlM0MlMkZkaXYlM0U=[\/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 Traits Extraction stage in Index Pipeline extracts specific attributes, or details that the search users express in their conversations. SearchAssist allows you to identify trait characteristics from a source field and save the identified traits in a target field so that it can be used to detect user intentions better. You can: Add multiple...","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\/133"}],"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=133"}],"version-history":[{"count":22,"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/posts\/133\/revisions"}],"predecessor-version":[{"id":1220,"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/posts\/133\/revisions\/1220"}],"wp:attachment":[{"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/media?parent=133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/categories?post=133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/tags?post=133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}