Currently appsearch_item table gets updated even if some of the content fails to get indexed on appsearch engine.
1. Set a text field as date field in schema for one of the fields
2. Try Indexing items
3. System marks items as indexed in appsearch_item even though the item is not indexed.
4. Check api log on appsearch engine for details. You will see errors array with data in response json.
Refer appsearch documentation https://www.elastic.co/guide/en/enterprise-search-clients/php/current/ap....
Appsearch response providdes error details for each item sent for indexing. Read the errors array for each item and if the error count is 0 then mark the item as indexed(Status = 0). Else keep the status as not indexed (Status=1)
Needs review
1.1
Code