Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 779
SiberianGuy Avatar asked Dec 20 '11 05:12

SiberianGuy


1 Answers

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?

like image 84
Matt Warren Avatar answered Jan 07 '23 16:01

Matt Warren