当我创建 Azure 搜索索引时,在编辑查询后运行重新索引后失败。
复制,
- 使用
SELECT c.id, c.Text from c
创建索引 - 对 500 多个数据运行索引,并且执行成功。
- 在 Azure 门户中,将 Azure 搜索数据源查询编辑为
SELECT c.id, c.Text from c WHERE c._ts >= @HighWaterMark ORDER BY c._ts
以使其检测更新的数据。 - 运行索引,失败并显示以下错误消息。
The data change detection policy is configured to use column '_ts', but that column is not present in the data source.
我可以在门户中看到Azure DocumentDB中存在_ts
值(当然,它是由Azure DocumentDB自动生成的)。但出了什么问题呢?
我是否必须删除并重新创建 @HighWaterMark
的数据源?
最佳答案
在 SELECT 子句中包含 _ts:
从 c 中选择 c.id、c.Text、c._ts,其中 c._ts >= @HighWaterMark ORDER BY c._ts
关于azure-cosmosdb - Azure 搜索与 Azure DocumentDB 索引错误 : _ts column not present,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38290635/