rnewson / couchdb-lucene

Enables full-text searching of CouchDB documents using Lucene
Apache License 2.0
769 stars 145 forks source link

Possible to support stale=ok type options? #289

Open Samon33 opened 3 years ago

Samon33 commented 3 years ago

In a distributed CouchDB cluster (i.e. every node has every shard, with cluster replication used for redundancy rather than load balancing), Lucene still appears to trigger internal CouchDB queries of every node, rather than just the 'local' node that it is configured to connect to.

In my situation I have a 3-node CouchDB cluster across 3 disperse datacenters, with a local Lucene instance at each site. Currently, I am seeing around 5TB of additional cluster traffic per month between the cluster nodes due to Lucene triggering full cluster queries.

Is there any way to leverage something like the stale=ok query parameter so that Couch does not need to query every node for each document?