2
votes

When I create Azure Search index, it failed after I run re-index after editing query.

To reproduce,

  1. Create index with SELECT c.id, c.Text from c
  2. Run index for 500+ data, and Successfully performed.
  3. In Azure Portal, edit Azure Search datasource query to SELECT c.id, c.Text from c WHERE c._ts >= @HighWaterMark ORDER BY c._ts in order to make it detect updated data.
  4. Run index, and failed with below error message.

The data change detection policy is configured to use column '_ts', but that column is not present in the data source.

I can see _ts value exists in Azure DocumentDB at Portal (of course, it is automatically generated by Azure DocumentDB). But what's wrong?

Do I have to delete-and-recreate datasource for @HighWaterMark?

1

1 Answers

2
votes

Include _ts in your SELECT clause:

SELECT c.id, c.Text, c._ts from c WHERE c._ts >= @HighWaterMark ORDER BY c._ts