在 StreamPage 中,我定义了此代码用于搜索
searchable do
text :html, :stored => true, :boost => 2
integer :stream_id
end
我有 44 条记录并在此设置上使用了重新索引
s = StreamPage.search do |st|
st.keywords 'fsdgsfdgdffsdfgsfdgfd'
end
因此,即使我运行上面的代码,我也会得到所有记录,任何我写进关键字的东西都会得到结果。