1

I'm using Greg's Event Store and I have two categories of streams, I would like to project some events (by type) from both categories into one projection.

My first solution would be to use "fromAll" and select the event types that I'm looking for to create the projection:

Category1-Stream1, 
Category1-Stream2, 
Category2-Stream1, 
Category2-Stream2
    to
FinalProjection

My second solution would be to create two category projections, and then project those two into my final one:

Category1-Stream1, 
Category1-Stream2, 
Category2-Stream1, 
Category2-Stream2
    to
SubCategory-Category1proj, 
SubCategory-Category2proj,
    to
FinalProjection

What would be the most efficient one? Is there any good practice about this need?

4

1 回答 1

1

最好的解决方案是使用fromStreams('$ce-category1', '$ce-category2'),感谢 Greg Young 通过 Google Groups 为我提供解决方案。

于 2017-03-24T19:01:04.630 回答