Solr 5

232 views
Skip to first unread message

James

unread,
Mar 27, 2015, 9:34:00 AM3/27/15
to ruby-s...@googlegroups.com
I think I have Sunspot and Solr 5 chatting together happily but I did have to update the schema.xml because Solr deprecated some of the field types.  Specifically the DateField and the Sortable fields.  So where it was this:

    <fieldType name="date" class="solr.DateField" omitNorms="true"/>
    <!-- *** This fieldType is used by Sunspot! *** -->
    <fieldType name="sdouble" class="solr.SortableDoubleField" omitNorms="true"/>
    <!-- *** This fieldType is used by Sunspot! *** -->
    <fieldType name="sfloat" class="solr.SortableFloatField" omitNorms="true"/>
    <!-- *** This fieldType is used by Sunspot! *** -->
    <fieldType name="sint" class="solr.SortableIntField" omitNorms="true"/>
    <!-- *** This fieldType is used by Sunspot! *** -->
    <fieldType name="slong" class="solr.SortableLongField" omitNorms="true"/>

I have changed it to this:

    <fieldType name="date" class="solr.TrieDateField" omitNorms="true"/>
    <!-- *** This fieldType is used by Sunspot! *** -->
    <fieldType name="sdouble" class="solr.TrieDoubleField" omitNorms="true"/>
    <!-- *** This fieldType is used by Sunspot! *** -->
    <fieldType name="sfloat" class="solr.TrieFloatField" omitNorms="true"/>
    <!-- *** This fieldType is used by Sunspot! *** -->
    <fieldType name="sint" class="solr.TrieIntField" omitNorms="true"/>
    <!-- *** This fieldType is used by Sunspot! *** -->
    <fieldType name="slong" class="solr.TrieLongField" omitNorms="true"/>

Wherever the docs said a field was deprecated, I changed it to the replacement field the documentation pointed me to.

I've reindexed the data set and confirmed that things seem to work as expected but I haven't gone in depth.  Can I get a double check from the group that those changes seem sensible and should work without hiccups?

Nick Zadrozny

unread,
Mar 27, 2015, 11:26:44 AM3/27/15
to ruby-s...@googlegroups.com, ruby-s...@googlegroups.com
These types should also be backwards compatible with Solr 4, maybe that's worth testing as well. @robsears?




--
You received this message because you are subscribed to the Google Groups "Sunspot" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-sunspot...@googlegroups.com.
To post to this group, send email to ruby-s...@googlegroups.com.
Visit this group at http://groups.google.com/group/ruby-sunspot.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages