http://sunspot.github.com/sunspot/docs/Sunspot.html#more_like_this-class_method
+ (Object) more_like_this(object, *types, &block) Initiate a MoreLikeThis search. MoreLikeThis is a special type of search that finds similar documents using fulltext comparison. The fields to be compared are
text
fields set up with the:more_like_this
option set totrue
. By default, more like this returns objects of the same type as the object used for comparison, but a list of types can optionally be passed to this method to return similar documents of other types. This will only work for types that have common fields.
example:
post = Post.first
Sunspot.more_like_this(post, Post, Page) do
fields :title, :body
with(:updated_at).greater_than(1.month.ago)
facet(:category_ids)
end
see also: http://sunspot.github.com/sunspot/docs/Sunspot/Query/MoreLikeThis.html