Jeremy,

The new documentation for creating schemas are still in progress, and docs for 
creating a custom schema are still a few weeks out.

curl -XPUT http://localhost:8098/search/schema -H'content-type:application/xml' 
--data @my_schema_file.xml

my_schema_file.xml should contain the custom solr schema XML. Note that, when 
uploading a custom schema, yokozuna needs certain fields to exist. You can add 
custom fields and types, but the following values are required (if any fields 
are missing, your schema upload will fail).

<schema name="default" version="1.5">
 <fields>
   <field name="_yz_id" type="_yz_str" indexed="true" stored="true" 
required="true"/>
   <field name="_yz_ed" type="_yz_str" indexed="true" stored="false"/>
   <field name="_yz_pn" type="_yz_str" indexed="true" stored="false"/>
   <field name="_yz_fpn" type="_yz_str" indexed="true" stored="false"/>
   <field name="_yz_vtag" type="_yz_str" indexed="true" stored="false"/>
   <field name="_yz_rk" type="_yz_str" indexed="true" stored="true"/>
   <field name="_yz_rt" type="_yz_str" indexed="true" stored="true"/>
   <field name="_yz_rb" type="_yz_str" indexed="true" stored="true"/>
   <field name="_yz_err" type="_yz_str" indexed="true" stored="false"/>
 </fields>

 <uniqueKey>_yz_id</uniqueKey>

 <types>
   <fieldType name="_yz_str" class="solr.StrField" sortMissingLast="true" />
 </types>
</schema>

The full default schema can be found here.

https://github.com/basho/yokozuna/blob/develop/priv/default_schema.xml

Note that the new Riak Search (Yokozuna) is a complete rewrite, with 0% in 
common (ok, maybe 10%) with the old search. That said, the search-cmd is not 
applicable for new search. It exists only as a legacy artifact for existing 
users who have yet to upgrade.

Eric


On Feb 4, 2014, at 1:12 PM, Jeremy Pierre <j.14...@gmail.com> wrote:

> Hi all,
> 
> I have a single vagrant node (ubuntu 12.04) running 2.0-pre11 for some 
> prototyping and need the new search awesomeness.  Creating and using an index 
> with the default schema works fine but adding my own is unclear.  
> 
> Old ML posts and Riak docs suggest using "search-cmd set-schema [the index I 
> want] [my schema xml]" should work but this yields a noproc error, as does 
> even "search-cmd show-schema <absent, search, the index I created>".
> 
> e.g.
> 
> vagrant@precise64:~$ search-cmd show-schema
> 
> %% Schema for 'search'
> RPC to 'riak@192.168.10.31' failed: {'EXIT',
>                                      {noproc,
>                                       {gen_server,call,
>                                        [riak_search_config,
>                                         {get_raw_schema,<<"search">>},
>                                         infinity]}}}
> 
> Am I missing anything obvious?
> 
> Thanks,
> 
> Jeremy
> _______________________________________________
> riak-users mailing list
> riak-users@lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

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

Reply via email to