Hi Eric, Thank you for your quick response.
It works now. Regards, Zhenguo 2014-09-01 1:47 GMT+08:00 Eric Redmond <eredm...@basho.com>: > Creating a search schema is non blocking, meaning that it will return ok > as it continues to process and propagate the schema on the backend. > Attempting to bind an index to a custom schema is generally because 1) the > schema failed to create (you can check out the solr.log or error.log for > details), 2) you're attempting to use the schema too fast, before it's had > time to propagate across the cluster. > > In your case, it looks like this first. > > Since you added. > > <dynamicField name="*" type="ignored" /> > > You have to define a fieldtype named "ignored". > > <fieldtype name="ignored" stored="false" indexed="false" > multiValued="true" class="solr.StrField" /> > > Hope that helps, > Eric > > > On Aug 31, 2014, at 10:32 AM, Yang Zhenguo <yangzhen...@gmail.com> wrote: > > Hi all, > > I encounter a problem on search index. > > 1. riakc_pb_socket:create_search_schema(Pid, <<"solutions">>, SchemaData). > ok > 2. riakc_pb_socket:create_search_index(Pid, <<"sln_index">>, > <<"solutions">>, []). > ok > 3. riakc_pb_socket:list_search_indexes(Pid1). > {ok,[]} > > However, if I create search index with default schema "_yz_default", > everything will be okay. > > Thanks in advance. > > Attached my schema: > > <?xml version="1.0" encoding="UTF-8" ?> > <schema name="sln_schema" version="1.5"> > <fields> > <field name="user_id" type="string" indexed="true" stored="true" /> > <field name="status" type="string" indexed="true" stored="true" /> > <field name="submit_time" type="date" indexed="true" stored="true" /> > <field name="run_time" type="date" indexed="true" stored="true" /> > > <!-- catch-all field --> > <dynamicField name="*" type="ignored" /> > > <!-- All of these fields are required by Riak Search --> > <field name="_yz_id" type="_yz_str" indexed="true" stored="true" > multiValued="false" required="true"/> > <field name="_yz_ed" type="_yz_str" indexed="true" stored="false" > multiValued="false"/> > <field name="_yz_pn" type="_yz_str" indexed="true" stored="false" > multiValued="false"/> > <field name="_yz_fpn" type="_yz_str" indexed="true" stored="false" > multiValued="false"/> > <field name="_yz_vtag" type="_yz_str" indexed="true" stored="false" > multiValued="false"/> > <field name="_yz_rk" type="_yz_str" indexed="true" stored="true" > multiValued="false"/> > <field name="_yz_rt" type="_yz_str" indexed="true" stored="true" > multiValued="false"/> > <field name="_yz_rb" type="_yz_str" indexed="true" stored="true" > multiValued="false"/> > <field name="_yz_err" type="_yz_str" indexed="true" stored="false" > multiValued="false"/> > </fields> > > <uniqueKey>_yz_id</uniqueKey> > > <types> > <!-- YZ String: Used for non-analyzed fields --> > <fieldType name="_yz_str" class="solr.StrField" sortMissingLast="true" > /> > </types> > </schema> > > -- > Zhenguo Yang > www.prinbit.com > _______________________________________________ > riak-users mailing list > riak-users@lists.basho.com > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com > > > -- Zhenguo Yang MSN: zgyang...@hotmail.com
_______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com