The Exclude Document stage in Index Pipeline allows you to drops all the documents that match the specified condition. The excluded documents are ignored in the next stages of the index pipeline and hence will not be indexed.

Ensure  to Train your app each time you make changes to any index configuration. This builds the index based on the updated configurations.

Configuration

To configure a exclude document stage, follow the below 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. On the right column, select Exclude Document from the Stage Type drop-down list.
  5. Enter a name in the Stage Name field.
  6. Enter a condition in the Condition field. You can add multiple conditions using the AND/OR connectors. Documents that contain the field mentioned in the condition will be excluded as part of the stage. See below for details.
    NOTE: It is 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 (if not mentioned in the condition) and the number of documents.
  8. Once done, click Save Configuration on the top-right.

Conditions

Condition is of the following format: ctx.fieldtype==value or ctx.fieldtype!=value. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed