def to_indexed(value)
      if value.is_a? Array
        if multiple?
          value.map { |val| to_indexed(val) }
        else
          raise ArgumentError, "#{name} is not a multiple-value field, so it cannot index values #{value.inspect}"
        end
      else
        @type.to_indexed(value)
      end
    end
def to_indexed(value)
      if value.is_a? Array
        if multiple?
          value.map { |val| to_indexed(val) }
        else
          raise ArgumentError, "#{name} is not a multiple-value field, so it cannot index values #{value.inspect}"
        end
      else
        @type.to_indexed(value)
      end
    end
Name with which this field is indexed internally. Based on public name and type or the +:as+ option.


 Convert a value to its representation for Solr indexing. This delegates
 to the #to_indexed method on the field's type.

 ==== Parameters

 value<Object>:: Value to convert to Solr representation

 ==== Returns

 String:: Solr representation of the object

 ==== Raises

 ArgumentError::
   the value is an array, but this field does not allow multiple values