We recently started using Sphinx full text search on our network community for moms. As we are building it with Rails we used Ultrasphinx plugin.
It is a nice tool but has several quirks. One of them is result filtering.
When you build your search form and want to limit search results by one of the integer fields in the model (in our case it was employment_term_id) you need to provide integers. Strings do not work. And guess what you get in params?
When building your query write:
Ultrasphinx::Search.new(:query => params[:query], :filters => {:employment_term_id => params[: employment_term_id].to_i)
Without the to_i you will be welcomed by totally cryptic error message:
index main: query error: no field 'employment_term_id' found in schema