Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 7929 invoked from network); 29 Nov 2009 11:47:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Nov 2009 11:47:34 -0000 Received: (qmail 36304 invoked by uid 500); 29 Nov 2009 11:47:32 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 36236 invoked by uid 500); 29 Nov 2009 11:47:31 -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 36226 invoked by uid 99); 29 Nov 2009 11:47:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 29 Nov 2009 11:47:31 +0000 X-ASF-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,NORMAL_HTTP_TO_IP,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of robert.newson@gmail.com designates 209.85.220.212 as permitted sender) Received: from [209.85.220.212] (HELO mail-fx0-f212.google.com) (209.85.220.212) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 29 Nov 2009 11:47:29 +0000 Received: by fxm4 with SMTP id 4so2537993fxm.33 for ; Sun, 29 Nov 2009 03:47:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=YL0ZS7tu2LQmRt61YWByW9qqcOCqcadvBATh7+LyAUo=; b=ebkfCjEJsT1hzWW9QlXoHQ2Bs8kCcjgTUh2ERaIS2mJouK7yBSt5JsLqTjXoS3VFt4 da0XELdYTJKvwHWUZiOtBhxwSTW0RhymOi2KYOuuFKBulCywVyWLuPK8VJNG0gYL7/3u 8LXsSBt5y/oXZCXOWMhYHLNfxT8HSabyb8pcs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=Zxhf4SkjvW0clwt2mmEsgJWdp/FjEUGAM0iTUMcF+kMoH5We8+yeqevXDOfT7fcPdG 41IGv3H2qmc166KzptgCMIStMPnc693Hina/KKovsLvdFTjIBbfSw7KN4kt4scQPFcud SnulT5BDFVHjErWRCyGnCfDOfNZ+rdQR9/ioM= MIME-Version: 1.0 Received: by 10.102.249.20 with SMTP id w20mr1078887muh.62.1259495227254; Sun, 29 Nov 2009 03:47:07 -0800 (PST) In-Reply-To: References: <46aeb24f0911280548t6aab3d9cs46ecbe9636fef018@mail.gmail.com> Date: Sun, 29 Nov 2009 11:47:07 +0000 Message-ID: <46aeb24f0911290347id58b2e6uc7071958f1f01b52@mail.gmail.com> Subject: Re: Help with couchdb-lucene From: Robert Newson To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable You might be getting this message because there are no documents in the index at all. The 0.4 code cannot distinguish between an empty index and one that does not exist. Ensure that you have one document with a "name" field, and I also suggest wrapping the call to add in a guard clause; if (doc.name) { ret.add(doc.name); } B. On Sat, Nov 28, 2009 at 2:31 PM, Smrchy wrote: > I've got a lucene directory that contains some files but they are really > small, so it seems not much was indexed. There are no errors in the > couchdb-lucene.log and i get this in my couch.log (in debug mode): > > [Sat, 28 Nov 2009 14:27:46 GMT] [info] [<0.1.0>] Apache CouchDB has start= ed > on http://192.168.11.95:5984/ > > [Sat, 28 Nov 2009 14:27:55 GMT] [debug] [<0.67.0>] 'GET' > /database/_fti/lucene/by_name?q=3DPeter {1,1} > Headers: > [{'Accept',"text/html,application/xhtml+xml,application/xml;q=3D0.9,*/*;q= =3D0.8"}, > =A0 =A0 =A0 =A0 =A0{'Accept-Charset',"ISO-8859-1,utf-8;q=3D0.7,*;q=3D0.7"= }, > =A0 =A0 =A0 =A0 =A0{'Accept-Encoding',"gzip,deflate"}, > =A0 =A0 =A0 =A0 =A0{'Accept-Language',"en-us,en;q=3D0.5"}, > =A0 =A0 =A0 =A0 =A0{'Connection',"keep-alive"}, > =A0 =A0 =A0 =A0 =A0{'Host',"192.168.11.95:5984"}, > =A0 =A0 =A0 =A0 =A0{'Keep-Alive',"300"}, > =A0 =A0 =A0 =A0 =A0{'User-Agent',"Mozilla/5.0 (Macintosh; U; Intel Mac OS= X 10.6; > en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 GTB6"}] > > [Sat, 28 Nov 2009 14:27:55 GMT] [debug] [<0.67.0>] OAuth Params: > [{"q","Peter"}] > > [Sat, 28 Nov 2009 14:27:55 GMT] [info] [<0.85.0>] EXTERNAL: Starting proc= ess > for: fti > > [Sat, 28 Nov 2009 14:27:55 GMT] [info] [<0.85.0>] COMMAND: /usr/bin/java > -jar /etc/couchdb/couchdb-lucene-0.4-jar-with-dependencies.jar -search > > [Sat, 28 Nov 2009 14:27:56 GMT] [info] [<0.67.0>] 192.168.11.240 - - 'GET= ' > /database/_fti/lucene/by_name?q=3DPeter 400 > > [Sat, 28 Nov 2009 14:27:56 GMT] [debug] [<0.86.0>] OS Proc: Unknown info: > {#Port<0.1016>, > > {data,{eol,<<"{\"code\":200,\"json\":{\"q\":\"default:peter\",\"etag\":\"= 1253b2ba04f\",\"view_sig\":\"\",\"skip\":0,\"limit\":25,\"total_rows\":0,\"= search_duration\":5,\"fetch_duration\":0,\"rows\":[]},\"headers\":{\"Conten= t-Type\":\"text/plain;charset=3Dutf-8\",\"Cache-Control\":\"max-age=3D5\",\= "ETag\":\"1253b2ba04f\"}}">>}}} > > > I still get a .../lucene/by_name is not a valid view > > when i call it. > > Hope this helps > > On Sat, Nov 28, 2009 at 2:48 PM, Robert Newson w= rote: > >> Verify that you've hooked up the indexer (under update_notification) >> and verify that it has built indexes (you should find a directory >> called 'lucene'). >> >> Also check both the couchdb.log and couchdb-lucene.log for errors. >> >> B. >> >> On Sat, Nov 28, 2009 at 1:38 PM, Smrchy wrote: >> > Hi, >> > >> > i don't know what i'm missing - maybe someone can push me in the right >> > direction? >> > >> > I installed couchdb-lucene 0.4 and couchdb seems to start without erro= rs. >> > >> > I created a document: >> > >> > { >> > =A0 "_id": "_design/lucene", >> > =A0 "_rev": "2-f7d29646a16db961903f7d7b73fe1d77", >> > =A0 "fulltext": { >> > =A0 =A0 =A0 "by_name": { >> > =A0 =A0 =A0 =A0 =A0 "index": "function(doc) { var ret=3Dnew Document()= ; ret.add( >> > doc.name); return ret }" >> > =A0 =A0 =A0 } >> > =A0 } >> > } >> > >> > I got lots of documents with doc.name =3D "somename" and some other fi= elds >> in >> > the database. >> > >> > Now whatever i do i can't query a document. >> > >> > I either get "database/lucene/by_name is not a valid view" with this >> query: >> > http://127.0.0.1:5984/database/_fti/lucene/by_name?q=3DPeter >> > >> > The above is the only design document i got in the db so far. Do i nee= d >> > another one? >> > >> > Some help would be appreciated :) >> > >> > Thx >> > Patrick >> > >> >