问题描述
对于我之前关于 RavenDb 的问题,我得到了以下评论:
I got the following comment to my previous question about RavenDb:
需要注意的一点是,QueryYourWrites 不适用于 Map/Reduce索引.对于这些你必须使用 WaitForNonStaleResults..()
什么意思?我认为 RavenDb 中的所有索引都是 Map/Reduce 索引...在哪些情况下 QueryYourWrites 选项有效?
What does it mean? I thought all indexes in RavenDb are Map/Reduce indexes... In which cases does QueryYourWrites option work?
推荐答案
抱歉,我写了那个评论,我不太清楚.
Sorry, I wrote that comment and I wasn't very clear.
RavenDB 索引总是需要有一个 Map 部分,但 Reduce 是可选的.所以如果你不指定Reduce函数,它就不是Map/Reduce索引,它只是一个Map索引.
RavenDB indexes always need to have a Map part, but the Reduce is optional. So if you don't specify a Reduce function, it's not a Map/Reduce index, it's just a Map index.
这就是我试图做出的区分.
That was the distinction I was trying to make.
由于 QueryYourWrites 使用的机制,它不适用于 Map/Reduce 索引.但它适用于仅地图索引.
Because of the mechanism that QueryYourWrites uses, it doesn't work with Map/Reduce indexes. But it works fine with a Map only index.
我希望这更清楚?
这篇关于RavenDb QueryYourWrites 和 Map/Reduce 索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!