couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From km <srikrishnamo...@gmail.com>
Subject couchdb-lucene javascript error missing parenthesis
Date Fri, 26 Feb 2010 11:48:52 GMT
Hi all,

I get a weird error while using couchdb lucene (0.4) with couchdb 0.10.0
I am unable to index a documents in the couch database.
my lucene view file is like this

{
   "_id": "_design/lucene",
   "_rev": "3-26665646212b049662ed2ff34c4319b3",
   "fulltext": {
       "byid": {
           "index": "function(doc){ var rec = new Document(); rec.add(doc);
return rec;}"
       }
   }
}

But couchdb-lucene.log says

 *2010-02-26 20:36:39,913 [couchdb-lucene] ERROR Error updating index.
org.mozilla.javascript.EvaluatorException: missing } after function body
*    at
org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:109)
    at
org.mozilla.javascript.DefaultErrorReporter.error(DefaultErrorReporter.java:96)
    at org.mozilla.javascript.Parser.addError(Parser.java:146)
    at org.mozilla.javascript.Parser.reportError(Parser.java:160)
    at org.mozilla.javascript.Parser.mustMatchToken(Parser.java:246)
    at org.mozilla.javascript.Parser.function(Parser.java:597)
    at org.mozilla.javascript.Parser.parse(Parser.java:394)
    at org.mozilla.javascript.Parser.parse(Parser.java:338)
    at org.mozilla.javascript.Context.compileImpl(Context.java:2252)
    at org.mozilla.javascript.Context.compileFunction(Context.java:1281)
    at org.mozilla.javascript.Context.compileFunction(Context.java:1270)
    at com.github.rnewson.couchdb.lucene.Rhino.<init>(Rhino.java:82)
    at
com.github.rnewson.couchdb.lucene.Index$Indexer.updateIndex(Index.java:192)
    at com.github.rnewson.couchdb.lucene.Index$Indexer.run(Index.java:87)
    at java.lang.Thread.run(Thread.java:619)

I have checked for any mismatching parentheses in index function - but thats
not the case !
This "missing } after function body" persists even after I set "index" to
an empty anonymous function.

please let me know if i am missing something.

thanks
Krishna

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