【发布时间】:2012-11-06 09:21:12
【问题描述】:
我有一个带有布尔字段的 RoR 模型:
field :active, :type => Boolean
在可搜索块中列出的内容:
searchable do
boolean :active
而且在搜索查询中:
s = Document.search do
with(:active, true)
end
在我的 Solr schema.xml 文件中:
<field name="active_b" type="boolean" indexed="true" stored="true"/>
问题是我的搜索并未将结果限制为仅将活动设置为 true 的文档。这在我的本地开发环境中有效,但在 Heroku 中无效。
有什么想法吗?
【问题讨论】:
-
RoR 中的字段不应该是 active_b 吗??
-
尝试将您的 schema.xml 上传到 heroku。如果 heroku 使用不同的 schema.xml。或者尝试在 heroku 上重新索引您的数据...
-
我在使用布尔值时遇到了同样的问题,但我没有使用 Heroku。你得到这份工作了吗?
标签: ruby-on-rails heroku solr sunspot websolr