Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C36CEDC6A for ; Thu, 19 Jul 2012 22:26:19 +0000 (UTC) Received: (qmail 30340 invoked by uid 500); 19 Jul 2012 22:26:17 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 30306 invoked by uid 500); 19 Jul 2012 22:26:17 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 30283 invoked by uid 99); 19 Jul 2012 22:26:16 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Jul 2012 22:26:16 +0000 Received: from localhost (HELO [192.168.1.7]) (127.0.0.1) (smtp-auth username rnewson, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Jul 2012 22:26:16 +0000 Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Apple Message framework v1278) Subject: Re: noob problem getting started with lucene From: Robert Newson In-Reply-To: Date: Thu, 19 Jul 2012 23:26:16 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <4C598FE8-7637-4863-8577-3B5C39A74042@apache.org> References: To: user@couchdb.apache.org X-Mailer: Apple Mail (2.1278) Your design document looks wrong to me (or you've omitted important = parts of it). Here's the one from the README for comparison; { "_id":"_design/foo", "fulltext": { "by_subject": { "index":"function(doc) { var ret=3Dnew Document(); = ret.add(doc.subject); return ret }" }, "by_content": { "index":"function(doc) { var ret=3Dnew Document(); = ret.add(doc.content); return ret }" } } } Note: the top-level key is called "fulltext", this is absent from your = design document. B. On 19 Jul 2012, at 19:25, Mark Hahn wrote: > (I posted this as an issue on rnewson/couchdb-lucene and I moved it = here) >=20 > I cannot get a lucene query to work and need help. >=20 > Lucene is running ok and the proxy from couchdb to lucene is working. >=20 > curl http://127.0.0.1:5985 > {"couchdb-lucene":"Welcome","version":"0.9.0-SNAPSHOT"} >=20 > curl http://root:tbgcomps2@localhost:5984/_fti > {"couchdb-lucene":"Welcome","version":"0.9.0-SNAPSHOT"} >=20 > My index view looks like this but the indexes directory is empty. = When is > Lucene supposed to create the index? On the first request? >=20 > { > name: { > index: function (doc) { > var ret; > if (doc.name && !doc.closed && !doc._deleted) { > ret =3D new Document(); > ret.add(doc.name); > return ret; > } > } > } > } >=20 > I've tried both of these URLs. They are based on two different = examples in > the readme, which seem to be contradictory formats. >=20 > Readme example: > http://127.0.0.1:5984/_fti/local/db1/_design/cl-test/idx?q=3Dhello >=20 > curl > http://localhost:5984/_fti/local/mydb/_design/mydesign/name?q=3Dtestname= > {"reason":"bad_request","code":500} >=20 > Readme example: > http://localhost:5984/database/_fti/_design/foo/by_subject?q=3Dhello >=20 > curl = http://localhost:5984/mydb/_fti/_design/mydesign/name?q=3Dtestname > {"reason":"bad_request","code":400} >=20 > Can someone suggest what I might be doing wrong?