RavenDb QueryYourWrites and Map/Reduce indexes

2019-04-25 16:15发布

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条回答
萌系小妹纸
2楼-- · 2019-04-25 16:34

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?

查看更多
登录 后发表回答