Follow these steps if you want the crawler to index a field as an array.
This guide will tell you how to add attributes to your tags so that the crawler acknowledges them
When your HTML is tagged correctly add the field to the schema and set its type to
list of string
Go to the Advanced mode in the Indexing screen and add the steps below replacing
fieldNamewith the name of your new field.
- id: convert-field title: Coerce single values into an array description: If the field contains a single value then convert it into an array. params: field: constant: fieldName repeated: constant: "true" typeName: constant: STRING - id: string-eval params: expression: constant: SPLIT(fields.fieldName,",") field: constant: fieldName condition: fields.fieldName
The first step ensures if the field is converted to an array if it ever contains just a single value. The second step splits the field value on every comma and writes the result back to the original field.
4. You should be able to test your work by adding any URL which has the field in its html to the 'Enter a field value' and then press Preview. The Response should show your field being output as an array
4. Save your changes
5. Go to the Domains screen and run a full re-index