Hi Troy,

me in the same situation has finally implemented the filtering at client-side 
(in that case the browser). You haven't mentioned how our server-side filtering 
is used finally - so, take that simply as another option you have.

Another option is to enable multirange-queries in the CouchDB. I know many 
people asking for them and there is existing a plugin/patch for - but there 
ends my knowledge. Maybe someone can help with a link.

ingo

On 13 Oct 2014, at 13:15, Troy Martin <t...@scriptedmotion.com> wrote:

> 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