Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couchdb-lucene support / interoperability with Cloudant #7

Closed
carlosduclos opened this issue Mar 17, 2017 · 4 comments
Closed

Couchdb-lucene support / interoperability with Cloudant #7

carlosduclos opened this issue Mar 17, 2017 · 4 comments

Comments

@carlosduclos
Copy link
Contributor

carlosduclos commented Mar 17, 2017

Original issue

homerjam
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

dscape
Would consider it, can you propose how this would look like in your view?

homerjam
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.

@carlosduclos
Copy link
Contributor Author

There is a pull request in the original issue, I asked the author to port it to this repository.

@homerjam
Copy link

@dscape could you comment on the suitability of the changes I made here?

I'm wondering if it's worth me porting the PR as it sat there unloved for a while before!

Personally I'm looking to move off Cloudant due to their pricing changes and forcing customers off the old plans (by dropping support next year). This would give me and maybe others(?) a reasonable alternative in couchdb-lucene.

@janl
Copy link
Member

janl commented Jul 24, 2018

Should have happened.

@janl janl closed this as completed Jul 24, 2018
@homerjam
Copy link

😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants