Reputation: 501
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?
Upvotes: 2
Views: 288
Reputation: 501
The best solution is to use fromStreams('$ce-category1', '$ce-category2'), thanks Greg Young for giving me the solution via Google Groups.
Upvotes: 2