SiberianGuy
SiberianGuy

Reputation: 25282

RavenDb QueryYourWrites and Map/Reduce indexes

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?

Upvotes: 7

Views: 428

Answers (1)

Matt Warren
Matt Warren

Reputation: 10291

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?

Upvotes: 7

Related Questions