{"id":1653,"date":"2022-01-06T03:35:17","date_gmt":"2022-01-06T03:35:17","guid":{"rendered":"https:\/\/multisite.korebots.com\/SearchAssist\/?p=1653"},"modified":"2022-01-18T06:06:17","modified_gmt":"2022-01-18T06:06:17","slug":"how-to-exclude-documents-from-scope","status":"publish","type":"post","link":"https:\/\/multisite.korebots.com\/SearchAssist\/how-to\/how-to-exclude-documents-from-scope\/","title":{"rendered":"How to Exclude Documents from Scope"},"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 Exclude Document 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;\"> allows you to drop all the documents that match the specified conditions. SearchAssist ignores documents in the subsequent stages of the indexing pipeline and leaves them without indexing.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Ensure\u00a0 to click <\/span><b>Train your App<\/b><span style=\"font-weight: 400;\"> each time you make changes to any index configuration. 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;\">To configure a exclude document stage, 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 (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;\">Select <\/span><b>Exclude Document<\/b><span style=\"font-weight: 400;\"> from the <\/span><b>Stage Type<\/b><span style=\"font-weight: 400;\"> dropdown list.<a ref=\"magnificPopup\" href=\"https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2021\/12\/Manage_indices_wb_exclude-documents1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1654 size-medium\" src=\"https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2021\/12\/Manage_indices_wb_exclude-documents1-300x266.png\" alt=\"\" width=\"300\" height=\"266\" \/><\/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.<\/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 the AND\/OR connectors. SearchAssist excludes the documents that contain the field mentioned in the conditions as part of the stage. See <\/span><a href=\"https:\/\/docs.google.com\/document\/d\/1A1G6RzvrbxqNQtagGPWiBYSm2sIZaKiB\/edit#bookmark=id.3swh6m4meq53\"><span style=\"font-weight: 400;\">Conditions for Excluding Docs<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">NOTE: It&#8217;s mandatory to add conditions for defining the Exclude Document stage.<a ref=\"magnificPopup\" href=\"https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2021\/12\/Manage_indices_wb_exclude-documents2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1656 size-large aligncenter\" src=\"https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2021\/12\/Manage_indices_wb_exclude-documents2-1024x489.png\" alt=\"\" width=\"640\" height=\"306\" srcset=\"https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2021\/12\/Manage_indices_wb_exclude-documents2-1024x489.png 1024w, https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2021\/12\/Manage_indices_wb_exclude-documents2-300x143.png 300w, https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2021\/12\/Manage_indices_wb_exclude-documents2.png 1664w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/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 of it in the conditions.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Once ready, click <\/span><b>Save Configuration<\/b><span style=\"font-weight: 400;\"> on the upper-right.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">Conditions for Excluding Docs<\/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;\">. i.e.,\u00a0 <\/span><span style=\"font-weight: 400;\">the condition can be a certain field type equals a certain value or not equal to a certain value.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">value here being file types: FAQs, web\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The <\/span><i><span style=\"font-weight: 400;\">field_name<\/span><\/i><span style=\"font-weight: 400;\"> can be obtained from the Fields table under Index Configuration.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><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 extraction to the content from a web source.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<\/div><\/div><\/div><\/div><\/div><\/div><\/section><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=\"w-post-elm post_navigation layout_simple inv_false\"><a class=\"post_navigation-item order_first to_prev\" href=\"https:\/\/multisite.korebots.com\/SearchAssist\/get-started\/platform-overview\/\" title=\"Platform Overview\"><div class=\"post_navigation-item-arrow\"><\/div><div class=\"post_navigation-item-meta\">Previous Post<\/div><div class=\"post_navigation-item-title\"><span>Platform Overview<\/span><\/div><\/a><a class=\"post_navigation-item order_second to_next\" href=\"https:\/\/multisite.korebots.com\/SearchAssist\/searchassist\/signup-and-create-your-first-search-app\/\" title=\"Getting Started\"><div class=\"post_navigation-item-arrow\"><\/div><div class=\"post_navigation-item-meta\">Next Post<\/div><div class=\"post_navigation-item-title\"><span>Getting Started<\/span><\/div><\/a><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"The Exclude Document stage in Indexing Pipeline allows you to drop all the documents that match the specified conditions. SearchAssist ignores documents in the subsequent stages of the indexing pipeline and leaves them without indexing. Ensure\u00a0 to click Train your App each time you make changes to any index configuration. This builds the index based...","protected":false},"author":18,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[59,58],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/posts\/1653"}],"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=1653"}],"version-history":[{"count":6,"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/posts\/1653\/revisions"}],"predecessor-version":[{"id":2714,"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/posts\/1653\/revisions\/2714"}],"wp:attachment":[{"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/media?parent=1653"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/categories?post=1653"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/tags?post=1653"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}