I have a virtual field weight
that changes based on the difference in time between now and object created_at time. I want to update it in Sunspot every 2 hours, so I was planning to call Topic.solr_index
.
However I think Sunspot will only index records which are marked dirty. So I guess this wouldn't work. My questions are:
- How to index this kind of non-dirty current-time-dependent fields in Sunspot
- How can I check that
weight
has been updated correctly in solr admin(or any other way to check indexing result)