How can i get list of defined thinking_sphinx attributes and fields on a model?
In particular i want to check whether input attribute is defined for sphinx
example definition:
has store.name, :as => :store_name
i want something like Model.sphinx_attributes.include? :store_name
The following should do the trick:
Fields are much the same:
Before running either, it’s good practice to run this first, to ensure the indexes are loaded:
If they are already loaded, that method will do nothing.