Validate data before sending to appsearch for indexing.

Created on 15 May 2023, over 1 year ago

Problem/Motivation

Appsearch engine doesnot index data if the data sent does not match the schema. eg: If timestamp or numeric 0 or empty string is sent for date datatype appsearch will not index that document. Similarly if empty string is sent for numbers datatype appseach fails to index datatype.

Steps to reproduce

1. Add a new date field to one of the content types.
2. Create a schema for U and select date as the datatype for changed field for node.
3. Create some new content for the same content type by leaving the date field blank
4. Try indexing the content.
5. Documents will fail to index.
6. Verify API logs on Appsearch engine. You will see an error "Invalid field value: Value '' cannot be parsed as a date (RFC 3339)"

Proposed resolution

Add a check to verify if the field being indexed matches the datatype selected in schema before sending content for indexing.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.1

Component

Code

Created by

🇮🇳India mohrerao

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024