I use Sunspot to generate many indexes and reviews of my applications.
In this application, I have 2 models that have a parent / child relationship to each other. With Sunspot, I index the number of children the parent has, so this is available for sorting, scoping, etc.
However, when I change the child model, the parent model does not automatically receive reindexing (since it has not changed). Coercion of the parent. Passing through call_back for the child also does not force the index.
So, before I start hacking:
What would be the best way to force an index on a parent class in Sunspot when modifying / adding a child model?
source
share