I've been debugging through the riak code, and it looks like the riak_search_js_extract process is not running, so it's not even getting to the point of executing my JS. Has this feature ever worked?<div><br></div>
<div><div>=ERROR REPORT==== 19-Jul-2011::10:25:24 ===</div><div>problem invoking hook riak_search_kv_hook:precommit -> exit:{noproc,</div><div>                                                             {gen_server,</div>
<div>                                                              call,</div><div>                                                              [riak_search_js_extract,</div><div>                                                               reserve_vm,</div>
<div>                                                               infinity]}}</div><div>[{gen_server,call,3},</div><div> {riak_kv_js_manager,blocking_dispatch,4},</div><div> {riak_search_kv_hook,run_extract,3},</div><div>
 {riak_search_kv_hook,make_indexed_doc,4},</div><div> {riak_search_kv_hook,index_object,2},</div><div> {riak_search_kv_hook,precommit,1},</div><div> {riak_kv_put_fsm,invoke_hook,4},</div><div> {riak_kv_put_fsm,precommit,2}]</div>
<div><br></div><div>-Greg</div><div><br></div><br><div class="gmail_quote">On Mon, Jul 18, 2011 at 6:22 PM, Greg Pascale <span dir="ltr"><<a href="mailto:greg@clipboard.com">greg@clipboard.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi,<div><br></div><div>I'm trying to use a custom extractor, but I can't for the life of me seem to get the syntax right. Even the simplest thing I can think to try won't work.</div>
<div><br></div><div>I've tried setting the rs_extractfun property as described in the documentation - both of these methods</div>
<div>    </div><span style="color:rgb(68, 68, 68);font-family:sans-serif;font-size:14px;line-height:14px"><ul style="margin-top:0px;margin-right:0px;margin-bottom:20px;margin-left:1.8em;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;outline-width:0px;outline-style:initial;outline-color:initial;font-size:14px;vertical-align:baseline;background-color:transparent;background-repeat:initial initial">

<li style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;outline-width:0px;outline-style:initial;outline-color:initial;font-size:12px;vertical-align:baseline;background-color:transparent;line-height:18px;color:rgb(78, 78, 78);background-repeat:initial initial">

{jsanon, {Bucket, Key}}, where Bucket and Key name a Riak object that contains the source of a Javascript function to call for extraction.</li><li style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;outline-width:0px;outline-style:initial;outline-color:initial;font-size:12px;vertical-align:baseline;background-color:transparent;line-height:18px;color:rgb(78, 78, 78);background-repeat:initial initial">

{jsanon, Source}, where Source is the source of a Javascript function to call for extraction.</li></ul></span><div>> Client:set_bucket(<<"extractTest">>, [{rs_extractfun, {jsanon, <<"function(){return{'name':'greg', 'login':'gpascale'};}">>}}]).</div>

<div>> Client:set_bucket(<<"extractTest">>, [{rs_extractfun, {jsanon, {<<"extractors">>, <<"myextractor">>}}}]).</div><div><br></div>
<div>but neither of these work.</div><div><br></div><div>Can somebody point out where I'm going wrong?</div><div><br>-- <br>Greg<div><div><div><div><div><a href="http://www.clipboard.com" target="_blank">Clipboard</a> is <a href="http://www.clipboard.com/jobs" target="_blank">hiring</a>!</div>

</div></div></div></div><br>
</div>
</blockquote></div><br><br clear="all"><br>-- <br>Greg<div><div><div><div><div><a href="http://www.clipboard.com" target="_blank">Clipboard</a> is <a href="http://www.clipboard.com/jobs" target="_blank">hiring</a>!</div>
</div></div></div></div><br>
</div>