This is another stream of conciseness post, with me trying to figure out what is the best way to resolve a given problem.
Update: I ended up solving this in a drastically different way. I'll post about this later on. I am keeping this here because it is a good post about how I think about a problem.
A while ago, I posted a visual description of how Map/Reduce is supposed to work. That was while I was working on RavenDB map/reduce implementation, but that isn’t actually how the current RavenDB map/reduce works.
Instead, it works like this:
Map phase:
CODE:
for item in docs:
for result in reduce(map(item)):
Persist(item.id, result.key, result)And the reduce phase:
CODE:
for result in reduce(results):
WriteToIndex(result)
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/301743/viewspace-741581/
,如需转载,请注明出处,否则将追究法律责任。