有没有办法使用 Sunspot 和 Rails 索引整数列表?
例子
我希望能够搜索演员 ID。
下面的代码只是伪代码。
class Movie < ActiveRecord::Base
searchable do
integers :actors_lists do
actors.map(&:id)
end
end
end
我不需要搜索演员姓名的能力,我只需要能够搜索演员 ID。
我正在使用带有 Sunspot 1.2.1 和 Ruby 1.9.2 的 Rails 3.1 RC。