Question

I'm reading a lot about raven db map/reduce indexes which are pre computed. Can I pass parameters to the map function so that map/reduce is executed on the fly in sharding environment.

For example in http://ayende.com/blog/89089/ravendb-multi-maps-reduce-indexes

var ups= session.Query<UserPostingStats, PostCountsByUser_WithName>()
    .Where(x => x.UserName.StartsWith("rah"))
    .ToList();

Instead of querying the results of the index can I pass the username parameter in the map function ?

I have 15 million documents sharded across 3 machines. I'm trying to run map/reduce queries on the 3 machines parallely. I looked at mongodb since the mongo's map/reduce runs on a javascript thread its very slow. Are any there viable solutions for such a use case ?

Thanks

Was it helpful?

Solution

No, you cannot. All map/reduce indexes are executed in the background. That create a MAJOR saving in cost when you need to execute it, since we can give you the pre-calc value.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top