Adding custom fields to the Query Attribute of the Elasticsearch index

You can populate FIELD1, FIELD2 and FIELD3 in the product index attribute section using SQL calls.

Before you begin

FIELD1, FIELD2 and FIELD3 for product attributes in the product index attribute section are not indexed. You can populate these fields if they are returned in the SQL response of product attributes. There will be fields in the attribute section with the names custom.field*.raw and custom.field*.normalized, which only hold the FIELD* values as strings.

When calling any query service API that returns the attributes for products, it will also return these fields in the API response with the field name custom.field* per attribute if present.

Steps to populate the fields:

Procedure

  1. Modify the SQL in the Product Stage 1e (Find Attributions) stage to include these fields to return into the response.
  2. Only for ESites:
    Include the same field name in Serialize Document processor (NiFi Flow > auth.reindex - Product Stage 1e (Find Attributions) > Find Attributes > Find Attributes from Database).
  3. Run a full reindexing.
    Note: While modifying the SQL, ensure the column name alias has FIELD as the column name prefix.