Ruby on rails Sunspot/Solr全文搜索-如何从全文搜索中排除某些字段?

Ruby on rails Sunspot/Solr全文搜索-如何从全文搜索中排除某些字段?,ruby-on-rails,sunspot-solr,Ruby On Rails,Sunspot Solr,我已经为我的rails应用程序实现了solr搜索。我已经为搜索字段编制了索引,它工作得很好。现在我想在搜索时排除一个名为Title的特定字段。如何在搜索时跳过此特定字段。索引文本字段是否也有任何排除选项 searchable do integer :id boolean :searchable boolean :premium string :status time :updated_at time :created_at ############

我已经为我的rails应用程序实现了solr搜索。我已经为搜索字段编制了索引,它工作得很好。现在我想在搜索时排除一个名为Title的特定字段。如何在搜索时跳过此特定字段。索引文本字段是否也有任何排除选项

searchable  do

  integer :id
  boolean :searchable
  boolean :premium
  string  :status
  time    :updated_at
  time    :created_at

  ###################################################
  # Fulltext search fields

  text :title

  text :summary 
  text :skills

end
在这里,如何从全文搜索中仅排除标题字段。like

 profiles = Profile.search do |s|
   s.fulltext @selected_filters[:query][:value] , exclude => :title
end

有什么办法可以这样做吗?请帮助

您可以指定在搜索中包含哪些字段

Profile.search do
  keywords @selected_filters[:query][:value], :fields => [:summary, :skills], :minimum_match => 1
end