2015-02-10 16 views

回答

0

我發現這個解決方案,這對我很有用。

settings do 
    mapping dynamic: false do 
    [:sort_name, :email, :status].each do |attr| 
     indexes attr, type: 'string', index: :not_analyzed 
    end 

    [:name].each do |attr| 
     indexes attr, type: 'string' 
    end 
end 
end