Open homerjam opened 9 years ago
Would consider it, can you propose how this would look like in your view?
I guess something like:
// usage
var nano = require('nano');
var db = nano({
url: 'http://localhost:5984/foo',
searchVendor: nano.CLOUDANT_SEARCH || nano.LUCENE_SEARCH
);
// in nano.js
// declare constants (after line 12)
nano.CLOUDANT_SEARCH = 'cloudant';
nano.LUCENE_SEARCH = 'lucene';
// choose viewPath style (around 474)
var viewPath;
if (meta.type === 'search' && cfg.searchVendor === nano.LUCENE_SEARCH) {
viewPath = '/_fti/local/' + dbName + '/_design/' + ddoc + '/' + viewName;
} else {
viewPath = '_design/' + ddoc + '/_' + meta.type + '/' + viewName;
}
The trouble is that couchdb-lucene uses a different path - normally the database name is at the start but instead it comes after the /_fti/local/
prefix. So this would require some further modification in the relax()
function I think.
I've had a go at this in #272
I know this is kinda latte now, but this repository has been merged into apache/couchdb-nano. Could you move your pull request there? I will create an issue there referencing this one. Here is the new issue for tracking.
Hi,
I've been using pouchdb with a plugin to allow couchdb-lucene to be used locally and cloudant in production - I presume this could be done by extending nano.
However as both extensions are very popular would you consider adding dedicated support for couchdb-lucene also? It would be nice to have a clean, maintained implementation.
Thanks