incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Szwed <>
Subject Can not get CouchDB external processes working
Date Fri, 23 Sep 2011 02:43:15 GMT

I have been trying to get couchdb-lucene working with bigcouch for days now and cannot work
out what i am doing wrong, i have even tried the example on the couchdb wiki and cannot get
it to work either.

Bigcouch is running as a single node on the cluster:

curl -X GET http://localhost:5984/

Created a database called 'database':
curl -X GET http://localhost:5984/database

I have modified the /opt/bigcouch/etc/local.ini with:

test = python /usr/local/src/couchdb/

_test = {couch_httpd_external, handle_external_req, <<"test">>}

level = debug

And created the /usr/local/src/couchdb/ containing:

import sys

    # Python 2.6
    import json
    # Prior to 2.6 requires simplejson
    import simplejson as json

def requests():
    # 'for line in sys.stdin' won't work here
    line = sys.stdin.readline()
    while line:
        yield json.loads(line)
        line = sys.stdin.readline()

def respond(code=200, data={}, headers={}):
    sys.stdout.write("%s\n" % json.dumps({"code": code, "json": data, "headers": headers}))

def main():
    for req in requests():
        respond(data={"qs": req["query"]})

if __name__ == "__main__":

curl -X GET http://localhost:5984/database/_test

just gives an error  {"error":"not_found","reason":"missing"}.

Which is the same response when trying to get lucene working, looks like the external handlers
are not being found at all.

Any help would be appreciated.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message