On 2/23/2011 2:47 AM, wilson Tuladhar wrote:
> now when I try to use this index name for indexing my document as :
> search:index_doc(<<"testindex">>, <<"my_doc">>, [{<<"fname">>,
> <<"Fname">>}, {<<"lname">>, <<"Lname">>}])
> it gives me this error:
> ** exception error: bad argument
>      in function  ets:lookup/2
>         called as ets:lookup(schema_table,<<"testUser">>)
>      in call from riak_search_config:get_schema/1
>      in call from riak_indexed_doc:new/4
>      in call from search:index_doc/4
> 
> and when i check ets:all() i don't see schema_table in the list??
> 

Look at
http://erlangwiki.dougedmunds.com/doku.php?id=erlang:ets
and
http://stackoverflow.com/questions/1964990/erlang-ets-reset-ets-table-after-getting-a-bad-argument

When erlang (where ets comes from) throws an exception, it restarts the
shell (automatically, invisibly).  The ets table you created in the
prior shell is destroyed, so checking ets:all() won't show it after the
restart.

Try checking ets:all() at a point just after you created it, but before
it throws the exception. Your table should be there.

- Doug Edmunds


_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to