From user-return-6560-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Thu Sep 24 19:48:45 2009 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 72930 invoked from network); 24 Sep 2009 19:48:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Sep 2009 19:48:45 -0000 Received: (qmail 86555 invoked by uid 500); 24 Sep 2009 19:48:44 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 86476 invoked by uid 500); 24 Sep 2009 19:48:43 -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 86466 invoked by uid 99); 24 Sep 2009 19:48:43 -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 19:48:43 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of awolff@gmail.com designates 209.85.216.195 as permitted sender) Received: from [209.85.216.195] (HELO mail-px0-f195.google.com) (209.85.216.195) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Sep 2009 19:48:34 +0000 Received: by pxi33 with SMTP id 33so2202293pxi.28 for ; Thu, 24 Sep 2009 12:48:12 -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; bh=BKJBNCXr9P2uwtfyAmPcPRKl5vMPCu1nImkjhQ082nI=; b=osJpCVDy/mF5cCAj5D3WVqkl+eG2taUZrA+49OZt/PtgrjB3hfuYe5okVUg3NM9kby eb0myjOm8Xh5dO8niPYDIGK2t92g1I2ViAcMTII/IwEokYtrW8wLRo1o+by7plwI7lgz d+Q/Qfk1pzD+9qb615icyRGL9L/BmzN2TmZa4= 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; b=YzIaqAfALFD9/7JYbvMwJsq+q7YLotF0UJucYjxBCrNlVtFjuWkj6BDE/csqCAkAOe RLBd9/1BFhMjSFehjezLL7CGtGH8NkYbtr6S6bw8Ao35gCgM5tjgN+/OH+8igY+j8Fmq rimQhjX5Nh59s+7GIjAGn8q6u+nb070ROpFIs= MIME-Version: 1.0 Received: by 10.140.165.21 with SMTP id n21mr233224rve.20.1253821692375; Thu, 24 Sep 2009 12:48:12 -0700 (PDT) In-Reply-To: References: <46aeb24f0909241012n56a6ab77vdd96f8499f3b1246@mail.gmail.com> Date: Thu, 24 Sep 2009 12:48:12 -0700 Message-ID: Subject: Re: lucene error From: Adam Wolff To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=000e0cd2e28495f3f30474581c01 X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd2e28495f3f30474581c01 Content-Type: text/plain; charset=ISO-8859-1 @foo is an XML attribute in rhino. Crummy E4X syntax. A On Thu, Sep 24, 2009 at 10:38 AM, Paul Davis wrote: > 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 = {} > [object Object] > js> f.@value = 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 = {} > [object Object] > js> f.@value = 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. > > > > "fulltext": { > > "by_description": { > > "defaults": > > { > > "store": "yes" > > }, > > "index": "function(doc) > > { > > if (doc['type:Description']['type:LocalizedString'].@value) > > { > > var ret=new Document(); > > ret.add(doc['type:Description']['type:LocalizedString'].@value); > > return ret; > > } > > }" > > > > -----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. > >> > >> at > >> org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3 > >> 557) > >> > >> at > >> org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3 > >> 535) > >> > >> at > >> org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3563) > >> > >> at > >> org.mozilla.javascript.ScriptRuntime.typeError1(ScriptRuntime.java:3575) > >> > >> at > >> org.mozilla.javascript.ScriptRuntime.notXmlError(ScriptRuntime.java:3655 > >> ) > >> > >> at > >> org.mozilla.javascript.ScriptRuntime.memberRef(ScriptRuntime.java:3733) > >> > >> at org.mozilla.javascript.gen.c10._c0(userFun:0) > >> > >> at org.mozilla.javascript.gen.c10.call(userFun) > >> > >> at > >> org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:66) > >> > >> at org.mozilla.javascript.gen.c11._c0(systemFun:0) > >> > >> at org.mozilla.javascript.gen.c11.call(systemFun) > >> > >> at > >> org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:401) > >> > >> at > >> org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3003) > >> > >> at org.mozilla.javascript.gen.c11.call(systemFun) > >> > >> at com.github.rnewson.couchdb.lucene.Rhino.map(Rhino.java:107) > >> > >> at > >> com.github.rnewson.couchdb.lucene.Index$Indexer.updateDatabase(Index.jav > >> a:267) > >> > >> at > >> com.github.rnewson.couchdb.lucene.Index$Indexer.updateIndex(Index.java:1 > >> 94) > >> > >> at > >> com.github.rnewson.couchdb.lucene.Index$Indexer.access$100(Index.java:51 > >> ) > >> > >> at com.github.rnewson.couchdb.lucene.Index.main(Index.java:347) > >> > >> at com.github.rnewson.couchdb.lucene.Main.main(Main.java:33) > >> > >> > > > --000e0cd2e28495f3f30474581c01--