post.rb
...
searchable do
text :title, :description
string :category
time :created_at
integer :post_id
end
...
post_controller.rb
@search = Post.search do
fulltext params[:q]
with(:created_at).less_than Time.zone.now
end
The above code works correctly, but when I try to scope by post_id or category, I get no results.
So, something like
with(:category).equal_to("category_name")
or
with :post_id, 1
Shows no results, and thus does not work correctly. Any ideas on how to debug sunspot solr? I've been to :8982/solr/admin and checked the development logs, but I can't figure out what would be wrong.