Hi Bogdan,

It looks like you are running into two issues here:

The 0.13 release of Riak Search doesn't support the "application/x-erlang"
content type, so your document is getting parsed using the "raw" extractor.
(Basically, it is getting treated as plain text, and the entire document is
indexed under a single field name.)

Also, in 0.13, the raw extractor had a bug that caused it to always use a
field name of "value". I believe this is the source of the webmachine error
that you see. This is tracked here (
https://issues.basho.com/show_bug.cgi?id=840) and fixed in the upcoming 0.14
release of Riak Search.

Your options in the short term are to either use JSON or XML encoding for
your document, or wait for the 0.14 release of Riak Search. (This should be
very soon, barring any unseen problems.)

If you'd like, you can play with the latest release in the riak_search-0.14
branch on Github. (
https://github.com/basho/riak_search/tree/riak_search-0.14)

Best,
Rusty

On Thu, Jan 6, 2011 at 10:51 AM, BOG BOG <[email protected]> wrote:

> Hello Riak Users,
>
> After a failed attempt to 'put' an object witk riakc_pb_socket api, into a
> bucket enabled for indexing and the retrying the same operation with erlang
> http
> client  I get the following error.
>
>
> It seems to me that this error does not even suppose to appear here.
> webmachine error: path="/riak/noi/0000159876/"
> {error,{error,badarg,
>
>  [{erlang,iolist_to_binary,[{error,missing_field,<<"value">>}]},
>               {wrq,append_to_response_body,2},
>               {riak_kv_wm_raw,accept_doc_body,2},
>               {webmachine_resource,resource_call,3},
>               {webmachine_resource,do,3},
>               {webmachine_decision_core,resource_call,1},
>               {webmachine_decision_core,accept_helper,0},
>               {webmachine_decision_core,decision,1}]}}
>
>
> The schema I am working with lokks like:
>
> {
>    schema,
>    [
>        {version, "1.1"},
>        {default_field, "index"},
>        {default_op, "or"},
>        {n_val, 3},
>        {analyzer_factory,
> "com.basho.search.analysis.DefaultAnalyzerFactory"}
>    ],
>    [
>        {field, [{name, "index"},{type, string}]},
>
>        {field, [{name, "period"},{type, integer}]},
>        {field, [{name, "request_date"},{type, string}]},
>        {field, [{name, "comment"},{type, string}]},
>        {field, [{name, "operator"},{type, string}]},
>        {field, [{name, "last_update"},{type, string}]},
>
>        {field, [{name, "worker_name"},{type, string}]},
>        {field, [{name, "worker_street1"},{type, string}]},
>        {field, [{name, "worker_street2"},{type, string}]},
>        {field, [{name, "worker_street3"},{type, string}]},
>        {field, [{name, "worker_city"},{type, string}]},
>        {field, [{name, "worker_sp"},{type, string}]},
>        {field, [{name, "worker_pc"},{type, string}]},
>        {field, [{name, "worker_cc"},{type, string}]},
>        {field, [{name, "worker_phone"},{type, string}]},
>        {field, [{name, "worker_fax"},{type, string}]},
>        {field, [{name, "worker_email"},{type, string}]}
> }.
>
> A working document would look like:
> [{"index",<<"0000314871">>},
>
>
>     {"period",1},
>
>
>     {"request_date",<<"2011-01-05 15:06:41">>},
>
>
>     {"comment",<<>>},
>
>
>     {"operator",<<"requests_new">>},
>
>
>     {"last_update",<<"2011-01-05 15:06:41">>},
>
>
>     {"worker",
>
>
>      {struct,[{"name",<<ILEANA>>},
>
>
>
>
>
>
>               {"street1",<<"Str. Muzeul Zambaccian 22B, Ap.1, Sector 1">>},
>
>
>               {"street2",<<>>},
>
>
>               {"street3",<<>>},
>
>
>               {"city",<<"Bucuresti">>},
>
>
>               {"sp",<<>>},
>
>
>               {"pc",<<>>},
>
>
>               {"cc",<<"RO">>},
>
>
>               {"phone",<<"+40.723454529">>},
>
>
>               {"fax",<<>>},
>
>
>               {"email",<<"[email protected]">>}]}}]
>
> and I am using riak_search-0.13
>
> Best Wishes,
> Bogdan
>
>
>
>
>
> _______________________________________________
> riak-users mailing list
> [email protected]
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to