DocumentDb -> Index 是保留字吗?

DocumentDb -> Is Index a reserved word?

我有一个可以使用 Azure 门户工具查询的 documentDb 实例:

当我用这样的代码编写相同的查询时:

let valuationCollection = client.CreateDocumentCollectionQuery(database.CollectionsLink).Where(fun dc -> dc.Id = "taxinformation").ToArray().FirstOrDefault()
let valuationDocumentLink = valuationCollection.SelfLink
let valuationQueryString = "SELECT * FROM ti WHERE ti.index = 1"
let valuationQuery = client.CreateDocumentQuery(valuationQueryString,valuationQueryString)
let valuationValue = valuationQuery |> Seq.head
let valuation = HouseValuation.Parse(valuationValue.ToString())

我收到这个错误:

System.AggregateException: One or more errors occurred. ---> Microsoft.Azure.Documents.NotFoundException: The value 'SELECT * FROM TI WHERE TI.INDEX = 1' specified for query '$resolveFor' is invalid. at Microsoft.Azure.Documents.BackoffRetryUtility`1.d__0.MoveNext()

我有其他查询可以正常工作。我想知道是否不应该使用 "index"?

提前致谢

问题出在上面第 4 行的代码本身:

let valuationQuery = client.CreateDocumentQuery(valuationQueryString,valuationQueryString)

应该是

let valuationQuery = client.CreateDocumentQuery(valuationDocumentLink,valuationQueryString)

不,索引未保留。你应该能够使用它。