Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 30781 invoked from network); 24 Sep 2009 17:38:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Sep 2009 17:38:37 -0000 Received: (qmail 11006 invoked by uid 500); 24 Sep 2009 17:38:36 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 10934 invoked by uid 500); 24 Sep 2009 17:38:35 -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 10924 invoked by uid 99); 24 Sep 2009 17:38:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Sep 2009 17:38:35 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of paul.joseph.davis@gmail.com designates 209.85.132.249 as permitted sender) Received: from [209.85.132.249] (HELO an-out-0708.google.com) (209.85.132.249) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Sep 2009 17:38:26 +0000 Received: by an-out-0708.google.com with SMTP id b2so679999ana.5 for ; Thu, 24 Sep 2009 10:38:05 -0700 (PDT) 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=9S33b6WvbxLz017em8+nCJwE4Zc/z5zBm4cPtD4Q+4c=; b=FaUdQ6TBys7eZ8BET72t/20kRbGL/Ufl2MEJyoO0YobXK2lmhVU0Br4oWDgSJUZFzo YrSB+m1PeRUAJnwbKPAOlbNqY1Wr0XTDHvJDDYe2jlCELZyVVYEeEK4XxFtJw9rkaisw qgo378bHeNOWWst+U10JiOt5yVzbewE9qR4/s= 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=ogPtk9CherznKdiCPgJumBrwQwUlPIEtXbmyMLlFU3GyR2xn5Mmn3xeoyRqc+m1ejc MbwYrbl85XbSpMPXpGzqKVF+xmv1yIrn3O7yioLyozNa786ij9EYDqFzlX0IHti2o7Jc MKzQJiAq/jWn5UcoLgdSD+CiYYKAC0xKfEKfA= MIME-Version: 1.0 Received: by 10.101.85.15 with SMTP id n15mr4498962anl.139.1253813885288; Thu, 24 Sep 2009 10:38:05 -0700 (PDT) In-Reply-To: References: <46aeb24f0909241012n56a6ab77vdd96f8499f3b1246@mail.gmail.com> Date: Thu, 24 Sep 2009 13:38:05 -0400 Message-ID: Subject: Re: lucene error From: Paul Davis To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org This is interesting, and I found it quite by accident. I just opened a js shell to check the foo.@value syntax thinking that the @value wouldn't be a valid property name. $ js js> f =3D {} [object Object] js> f.@value =3D 2; 2 Which looks ok, but the first shell I actually tried did this: $ js Rhino 1.7 release 1 2008 11 26 js> f =3D {} [object Object] js> f.@value =3D 2; js: "", line 3: uncaught JavaScript runtime exception: TypeError: [object Object] is not an xml object. at :3 It would appear that on my Ubuntu machine the js shell is provided by Rhino which is what couchdb-lucene uses and the @value is invalid for normal objects. Weird... Paul Davis On Thu, Sep 24, 2009 at 1:28 PM, Michael McCaffrey wrote: > Yep, I stepped down into the source to see where it executes the function= ... > > Here's the fulltext function. > > I'm referencing these fields in _views functions without a problem. > > =A0"fulltext": { > =A0 =A0 =A0"by_description": { > =A0 =A0 =A0"defaults": > =A0 =A0 =A0{ > =A0 =A0 =A0 =A0"store": "yes" > =A0 =A0 =A0}, > =A0 =A0 =A0"index": "function(doc) > =A0 =A0 =A0{ > =A0 =A0 =A0if (doc['type:Description']['type:LocalizedString'].@value) > =A0 =A0 =A0{ > =A0 =A0 =A0 =A0var ret=3Dnew Document(); > =A0 =A0 =A0 =A0ret.add(doc['type:Description']['type:LocalizedString'].@v= alue); > =A0 =A0 =A0 =A0return ret; > =A0 =A0 =A0} > =A0 =A0 =A0}" > > -----Original Message----- > From: Robert Newson [mailto:robert.newson@gmail.com] > Sent: Thursday, September 24, 2009 11:13 AM > To: user@couchdb.apache.org > Subject: Re: lucene error > > The first thing I'd suspect is a Javascript syntax or runtime error in > your function (but, hey, I would say that, right?). > > This stack trace is at the point where user-entered data hits the > runway, as it were, so it's not so unreasonable. Perhaps you could > paste your fulltext function? > > B. > > On Thu, Sep 24, 2009 at 5:25 PM, Michael McCaffrey > wrote: >> Thought I'd throw this out here while I dig into the code... >> >> >> >> Any ideas why this is happening? >> >> >> >> I believe it is happening when the indices are being built for lucene. >> For instance, if I change a fulltext function, it happens when I save >> the document. >> >> >> >> 2009-09-24 10:47:37,744 [couchdb-lucene] WARN function raised exception >> (TypeError: [object Object] is not an xml object.) with >> 019266804cfd515842c1e73a77d6528d >> >> org.mozilla.javascript.EcmaError: TypeError: [object Object] is not an >> xml object. >> >> =A0 =A0 =A0 =A0at >> org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3 >> 557) >> >> =A0 =A0 =A0 =A0at >> org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3 >> 535) >> >> =A0 =A0 =A0 =A0at >> org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3563) >> >> =A0 =A0 =A0 =A0at >> org.mozilla.javascript.ScriptRuntime.typeError1(ScriptRuntime.java:3575) >> >> =A0 =A0 =A0 =A0at >> org.mozilla.javascript.ScriptRuntime.notXmlError(ScriptRuntime.java:3655 >> ) >> >> =A0 =A0 =A0 =A0at >> org.mozilla.javascript.ScriptRuntime.memberRef(ScriptRuntime.java:3733) >> >> =A0 =A0 =A0 =A0at org.mozilla.javascript.gen.c10._c0(userFun:0) >> >> =A0 =A0 =A0 =A0at org.mozilla.javascript.gen.c10.call(userFun) >> >> =A0 =A0 =A0 =A0at >> org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:66) >> >> =A0 =A0 =A0 =A0at org.mozilla.javascript.gen.c11._c0(systemFun:0) >> >> =A0 =A0 =A0 =A0at org.mozilla.javascript.gen.c11.call(systemFun) >> >> =A0 =A0 =A0 =A0at >> org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:401) >> >> =A0 =A0 =A0 =A0at >> org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3003) >> >> =A0 =A0 =A0 =A0at org.mozilla.javascript.gen.c11.call(systemFun) >> >> =A0 =A0 =A0 =A0at com.github.rnewson.couchdb.lucene.Rhino.map(Rhino.java= :107) >> >> =A0 =A0 =A0 =A0at >> com.github.rnewson.couchdb.lucene.Index$Indexer.updateDatabase(Index.jav >> a:267) >> >> =A0 =A0 =A0 =A0at >> com.github.rnewson.couchdb.lucene.Index$Indexer.updateIndex(Index.java:1 >> 94) >> >> =A0 =A0 =A0 =A0at >> com.github.rnewson.couchdb.lucene.Index$Indexer.access$100(Index.java:51 >> ) >> >> =A0 =A0 =A0 =A0at com.github.rnewson.couchdb.lucene.Index.main(Index.jav= a:347) >> >> =A0 =A0 =A0 =A0at com.github.rnewson.couchdb.lucene.Main.main(Main.java:= 33) >> >> >