Skip to content
This repository has been archived by the owner on May 4, 2023. It is now read-only.

_fti url for CouchDB 2.0 #239

Open
SCdF opened this issue Nov 29, 2016 · 7 comments
Open

_fti url for CouchDB 2.0 #239

SCdF opened this issue Nov 29, 2016 · 7 comments

Comments

@SCdF
Copy link

SCdF commented Nov 29, 2016

As part of the upgrade from 1.6 to 2.0 a bunch of URLs that relate to node-specific things have moved.

For example, /_config is now /_node/couchdb@localhost/_config.

The _fti URL seems to be similarly affected. But, it is not accessible under the single node, i.e. /_node/couchdb@localhost/_fti does not work.

However, accessing CouchDB via the single-node port does work:

scdf at SCdF in ~/Code
$ curl http://localhost:5985/
{"couchdb-lucene":"Welcome","version":"2.0.0-SNAPSHOT"}
scdf at SCdF in ~/Code
$ curl http://admin:pass@localhost:5984/_fti
{"error":"not_found","reason":"Database does not exist."}
scdf at SCdF in ~/Code
$ curl http://admin:pass@localhost:5984/_node/couchdb@localhost/_fti
{"error":"not_found","reason":"missing"}
scdf at SCdF in ~/Code
$ curl http://admin:pass@localhost:5986/_fti
{"couchdb-lucene":"Welcome","version":"2.0.0-SNAPSHOT"}

I think this means that the README documentation should be updated to say that either:

  • with CouchDB2.0 installations the _fti endpoint will be under port 5896
  • or with differing instructions on how to add the _fti endpoint to the CouchDB config so it appears on port 5984.

But I'm not sure which. I don't think there is any harm in accessing it via 5896, except that it's annoying it's a different port.

@SCdF
Copy link
Author

SCdF commented Nov 29, 2016

I'm not convinced that using it via 5896 actually works, but it could be on my end…

@rnewson
Copy link
Owner

rnewson commented Dec 1, 2016

ah, true, the hook into couchdb's url space is broken. You can hit :5985 of course and it'll happily pull from couchdb 5984 and index the databases there.

Extending the namespace in couchdb 2.0 requires erlang code rather than config right now.

@wassx
Copy link

wassx commented Nov 12, 2017

Hi!
So using 5896 is no workaround?

@rnewson
Copy link
Owner

rnewson commented Nov 12, 2017

couchdb's port 5986 is a legacy artifact of the merge, it is not cluster aware. the databases you make on 5984 are not usable on 5986 and vice versa.

@wassx
Copy link

wassx commented Nov 13, 2017

Ah oh thanks! Maybe just a little advice/directions for me: I currently used couchdb 1.7 with couchdb-lucene until the high sierra update. Now I have to switch to couchdb2. To have the same functionality as before, should i build the couchdb with the built in search functionality or is there a way to achieve this via the same couchdb-lucene? As far as I understood the "only thing" is the _fti hook.

@rnewson
Copy link
Owner

rnewson commented Nov 13, 2017

couchdb does not have built-in search functionality but I assume you're referring to IBM Cloudant's recently open-sourced search solution (dreyfus/clouseau). That's a fine alternative to couchdb-lucene and designed for the clustering that CouchDB 2.x introduced (I am the author of that solution also).

couchdb-lucene is compatible with CouchDB 2.0 (because of BigCouch, it was compatible before CouchDB 2.0 was released), you just can't extend CouchDB's http api like you could in 1.7.

@wassx
Copy link

wassx commented Nov 13, 2017

Thank you for the quick reply. Sorry for the vague description, yes I was thinking of the dreyfus/clouseau solution. I'll give it a try. Thanks!

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

No branches or pull requests

3 participants