How to Exclude Documents from Scope

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  to click Train your App each time you make changes to any index configuration. This builds the index based on the updated configurations.

To configure a exclude document stage, take the following steps:

  1. Click the Indices tab on the top.
  2. On the left pane, under the Index Configuration section, click Workbench.
  3. On the Workbench (Index Configuration) page, on the Stages column, click the + icon.
  4. Select Exclude Document from the Stage Type dropdown list.
  5. Enter a name in the Stage Name field.
  6. Enter a condition in the Condition 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 Conditions for Excluding Docs.
    NOTE: It’s mandatory to add conditions for defining the Exclude Document stage.
  7. Click Simulate 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. 
  8. Once ready, click Save Configuration on the upper-right.

Conditions for Excluding Docs

Condition is of the following format: ctx.fieldtype==value or ctx.fieldtype!=value. i.e.,  the condition can be a certain field type equals a certain value or not equal to a certain value. 

value here being file types: FAQs, web 

The field_name can be obtained from the Fields table under Index Configuration.
For example, ctx.contentType==”web” to restrict the extraction to the content from a web source.