我有两个索引,index1是旧的和当前使用的索引,而新的index2还包含一个新的字符串数组字段myArray1。
Azure Search使用documentdb集合作为源,并在那里正确填写myArray1。但是,在Azure搜索资源管理器中查询文档时,myArray1始终为空。搜索资源管理器设置为index2。我也试过重置index2但没有运气。
我正在使用CreateDataSource.json来定义documentdb集合的查询。在这个查询中,我选择了prop myArray1。
知道为什么索引没有获取存储在myArray中的值吗?
以下是数据源查询:
SELECT c.id AS Id, c.crew AS Crews, c['cast'] AS Casts FROM c WHERE c._ts >= @HighWaterMark
如果我在Azure搜索中针对documentdb运行它,它可以正常工作。
这是索引定义:
Index definition = new Index()
{
Name = "index-docdb4",
Fields = new[]
{
new Field("Id", DataType.String, AnalyzerName.StandardLucene) { IsKey = true, IsFilterable = true },
new Field("Crews", DataType.Collection(DataType.String)) { IsFilterable = true },
new Field("Casts", DataType.Collection(DataType.String)) { IsFilterable = true }
}
};
这是索引器json文件
{
"name": "indexer-docdb4",
"dataSourceName": "datasource-docdb",
"targetIndexName": "index-docdb4",
"schedule": {
"interval": "PT5M",
"startTime": "2015-01-01T00:00:00Z"
}
}
这是一个documentdb示例文件
{
"id": "300627",
"title": "Carmen",
"originalTitle": "Carmen",
"year": 2011,
"genres": [
"Music"
],
"partitionKey": 7,
"_rid": "OsZtAIcaugECAAAAAAAAAA==",
"_self": "dbs/OsZtAA==/colls/OsZtAIcaugE=/docs/OsZtAIcaugECAAAAAAAAAA==/",
"_etag": "\"0400d17e-0000-0000-0000-590a493a0000\"",
"_attachments": "attachments/",
"cast": [
"315986",
"321880",
"603325",
"484671",
"603324",
"734554",
"734555",
"706818",
"711766",
"734556",
"734455"
],
"crew": [
"58185",
"390726",
"302640",
"670953",
"28046",
"122587"
],
"_ts": 1493846327
},