I've been developing using Couchbase Server 4.0 and upgrading to 5.0 is down the road but not at the moment.
But for now I do need to search views (map/reduce) using text search, on Couchbase Lite .Net there is PostFilter that serve the purpose.
But I could not find the same settings on Couchnode, checking the Couchbase Lite .Net told me that a query option might help.
I tried couple of things like this:
query.options.filter = r => {
console.log('******', r)
return true
}
query.options.post_filter = r => {
console.log('******', r)
return true
}
query.options.postFilter = r => {
console.log('******', r)
return true
}
but nothing seems to work. Anyone experienced this before please help!!
On Couchbase server, map/reduce queries are created on the Server cluster itself, not created in the SDK like with Couchbase Lite. An example:
When you create a view, you give it a name. You can call these view from the Node SDK (couchnode) by name like so:
See the documentation: https://docs.couchbase.com/server/4.0/developer-guide/views-writing.html and https://docs.couchbase.com/nodejs-sdk/2.6/view-queries-with-sdk.html