rnewson / couchdb-lucene

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

optimize, expunge and cleanup calls returns bad_request #232

Closed drlinux closed 8 years ago

drlinux commented 8 years ago

When I call optimize, expunge or cleanup actions via curl or browser I've got following error:

Example url: (using httpd_global_handlers)

$ curl -X POST "http://localhost:5985/_fti/local/trades/_design/search/by_all/_optimize"

{"reason":"bad_request","code":400}

$ curl "http://localhost:5985/_fti/local/trades/_design/search/by_all/_optimize"

{"reason":"bad_request","code":400}

Am I missing something?

rnewson commented 8 years ago

You're hitting the wrong port. :)

The _fti bit is where couchdb-lucene is hooked into couchdb, so try this on port 5984.

if you want to go direct to couchdb-lucene, on port 5985, you should omit the _fti/local part of the url.

drlinux commented 8 years ago

thanks dude, it works ;)