not able to create schema

Doug Edmunds dougedmunds at
Wed Feb 23 12:07:20 EST 2011

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

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

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

More information about the riak-users mailing list