I've been using couchdb in a project of mine for awhile now with great success. 
I've run into a problem though that I can't seem to solve with any level of 
efficiency. 

I use couch to store workorder documents. I have a list page that outputs a 
list of workorders along with 6 workorder fields that the user can filter the 
list on. For example, the user can choose to filter workorders by workorderId, 
dateCreated, etc.

To enable filtering, I've been using elasticsearch instead of couch because I 
don't know a good way to filter the workorder documents using couch without 
creating a view for every combination of the filters. The problem I'm running 
into is elasticsearch is near real-time for indexing, so if I pull up the list 
page, access a workorder, update it and then return to the list page, there is 
up to a one-second delay due to the index refresh rate before the list page 
will contain the updated information. How to deal with that? 

I've been forcibly refreshing the elasticsearch index before returning to the 
list page, but I can't see that scaling well. Consequently, I've been thinking 
more and more about filtering documents in couch instead of relying on 
elasticsearch. Can anyone offer me any suggestions on how to go about this or 
have I run into a wall here?

Thanks,

Troy

Reply via email to