RavenDb QueryYourWrites and Map/Reduce indexes

时间秒杀一切 提交于 2020-02-21 11:03:23

问题


I got the following comment to my previous question about RavenDb:

One thing to note, QueryYourWrites doesn't work with Map/Reduce indexes. For these you have to use WaitForNonStaleResults..()

What does it mean? I thought all indexes in RavenDb are Map/Reduce indexes... In which cases does QueryYourWrites option work?


回答1:


Sorry, I wrote that comment and I wasn't very clear.

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.

Because of the mechanism that QueryYourWrites uses, it doesn't work with Map/Reduce indexes. But it works fine with a Map only index.

I hope this is clearer?



来源:https://stackoverflow.com/questions/8571349/ravendb-queryyourwrites-and-map-reduce-indexes

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!