This repository has been archived by the owner on May 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 147
TypeError when creating lucene document #40
Comments
I think it's a bug in your function but I can't see it. Rhino doesn't need any default values injected, so it's probably an obscurly reported Javascript problem. |
I'll investigate further and let you know if I find out. Thank you for your reply. |
Dunno if it's the same thing, but I got this error when treating an array attribute as an Array (by calling join on it): http://japhr.blogspot.com/2010/02/weird-little-couchdb-lucene-bug.html I have a workaround, but hopefully this might help to resolve. |
hi, I believe this is now fixed. The issue was in the conversion code. |
Dunno if that addressed the issue for the OP, but that resolved the TypeError issue for me, thanks! |
resolved in 0.5 |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I'm using couchdb-lucene 0.5 as of today (01-07-2010) and couchdb 0.10.
When couchdb-lucene is indexing my documents, during the first access of the view I'm getting a TypeError exception that's preventing the document to be indexed:
2010-01-07 23:45:08,859 WARN couchdb.lucene.ViewIndexer.localhost/5984/knownet/bag/knsearch 16bb3f66e8d4c88d11b4e5c092ba38ab caused TypeError: Cannot find default value for object. (unnamed script#37)
I modified the DocumentConverterTest.java class to using my documents and my functions and the exception is still being thrown:
marcosvm@pepita:~/Servers/couchdb-lucene-0.5-SNAPSHOT $ jruby document_converter_test.rb
Loaded suite document_converter_test
Started
E
Finished in 0.258 seconds.
test_document_conversion(DocumentConverterTest):
NativeException: org.mozilla.javascript.EcmaError: TypeError: Cannot find default value for object. (single#49)
org/mozilla/javascript/ScriptRuntime.java:3654:in
constructError' org/mozilla/javascript/ScriptRuntime.java:3632:in
constructError'org/mozilla/javascript/ScriptRuntime.java:3660:in
typeError' org/mozilla/javascript/ScriptRuntime.java:3672:in
typeError1'org/mozilla/javascript/ScriptableObject.java:781:in
getDefaultValue' org/mozilla/javascript/ScriptableObject.java:700:in
getDefaultValue'org/mozilla/javascript/ScriptRuntime.java:724:in
toString' org/mozilla/javascript/ScriptRuntime.java:3741:in
notFunctionError'org/mozilla/javascript/ScriptRuntime.java:2247:in
getPropFunctionAndThisHelper' org/mozilla/javascript/ScriptRuntime.java:2214:in
getPropFunctionAndThis'org/mozilla/javascript/gen/single:49:in
_c0' org/mozilla/javascript/gen/single:-1:in
call'org/mozilla/javascript/ContextFactory.java:398:in
doTopCall' org/mozilla/javascript/ScriptRuntime.java:3065:in
doTopCall'org/mozilla/javascript/gen/single:-1:in
call' com/github/rnewson/couchdb/lucene/DocumentConverter.java:59:in
convert'document_converter_test.rb:23:in `test_document_conversion'
1 tests, 0 assertions, 0 failures, 1 errors
I'm not sure how to provide this default value required by Rhino or if it's an actual bug during the document conversion.
I put a copy of the function and one document here: http://gist.github.com/271912
Any help would be appreciated.
Thanks is advance,
Marcos
The text was updated successfully, but these errors were encountered: