这似乎是一个常见任务,我确信其他人已经遇到它。 如果我的控制器这样说: def index
s = Sunspot.search Organization do |query|
query.keywords params[:q] unless params[:q].blank?
query.with(:searchable).equal_to(params[:filt
我有一个部署延迟作业的模型,该作业更新其某些属性。该模型宣布“可搜索”... ... searchable do
text :content, :stored => true
end
......我认为会保存后重新索引。在测试中,这似乎并非如此。如果我运行:rake sunspot:reindex,那么一切都按预期工作。什么可能导致这个问题?
我是Solr搜索的新手,并试图掌握如何处理结果排序。我正在使用Ruby on Rails和Sunspot gem来与Solr进行交互。 我有一篇文章的模式,即有被索引以下字段: text Title
text AuthorNames
integer NumberOfReviews
我希望能够在Solr的执行搜索,其中: 确切名称匹配之前返回 正面加权是按比例给出具有较大NumberOfRe
我已经通过github中的文档:http://github.com/outoftime/sunspot找到突出显示的解决方案,但它似乎并不适用于我。 我的工作模式有这样的块(省略目的某些字段):
searchable do
text :name
string :name, :stored => true
time :updated_at
tim