Can not list search_index after creating it succeed

Yang Zhenguo yangzhenguo at gmail.com
Sun Aug 31 13:32:10 EDT 2014


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20140901/2a3fadee/attachment.html>


More information about the riak-users mailing list