We are creating lucene indexes from data being stored in event store as a stream of events. Those indexes are used to provide efficient paging/sorting/search capabilities with our data.
It happens that we have to duplicate all data in indexes in order to fulfill our requirements. What is conceptually the best way to query data in this situation?
I see 2 options:
- query all data for building view models directly from index
- query only list of ids from index and use those ids to query data from event store
We are concerned about scalability and fault tolerance as well, so I have to think about those also. Any suggestions?