non-indexable SOLR schema

Alex De la rosa alex.rosa.box at gmail.com
Sat Apr 4 10:25:26 EDT 2015


Hi all,

To be able to use counters/sets/maps in Riak I have to store the object
into a defined bucket_type indexed via SOLR.

However, this will require extra disk space as data will be indexed (if
using the default schema). Can I create a custom schema "ignoring" all
fields so nothing is indexed? I don't need to use Riak Search on these
objects, as I always know the KEY to fetch them. A schema like this would
work? ( I guess that I can not put [ indexed="false" ] in the "_yz*" fields
required by Riak, right? Or is it possible to not index that data either? )

—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—
<?xml version="1.0" encoding="UTF-8" ?>
<schema name="schedule" version="1.5">
 <fields>
   <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>
    <fieldtype name="ignored" stored="false" indexed="false"
multiValued="true" class="solr.StrField" />
    <!-- YZ String: Used for non-analyzed fields -->
    <fieldType name="_yz_str" class="solr.StrField" sortMissingLast="true"
/>
 </types>
</schema>
—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—

Another question, can I use the [ compressed="true" ] to save disk space?
in both <dynamicField name="*" type="ignored" /> and "_yz*" fields?

Thanks,
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20150404/810e3e6c/attachment-0002.html>


More information about the riak-users mailing list