Exclude draft articles from Solr index with Sunspot
Posted
by Bogdan Gusiev
on Stack Overflow
See other posts from Stack Overflow
or by Bogdan Gusiev
Published on 2010-04-28T14:22:47Z
Indexed on
2010/04/28
19:07 UTC
Read the original article
Hit count: 373
I have an indexed model called Article and I don't want solr to index unpublished articles.
class Article < ActiveRecord::Base
searchable do
text :title
text :body
end
end
How can I specify that article that is not #published? should not be indexed?
© Stack Overflow or respective owner