From what I've read in Search API's settings, it sounds like pages should be indexing when cron is ran. This doesn't seem to be the case, but perhaps my logic is flawed.
I help manage a blog/news site. All of the content is indexed through search API, and I'm rendering lists of that indexed content using Views. One View display renders a list of the site's most popular content. This is calculated using the Statistics module. You can see here that I'm sorting this view using the
Number of views field:
Initially, I didn't think that the sort criteria was working at all. I added the
Number of views to the rendered output for testing, and found that the pages weren't being reordered when the page views changes.
However, I eventually discovered that the nodes will reorder, only after Search API is reindexed manually. Currently, Search API is set to index nodes immediately upon publishing, but I'm assuming that a full reindex does not occur when this happening. I tested this by creating a new node, and found that the order of nodes did not update. I've also run Cron manually, and have found that this does not work either.
Now, I'm of the impression that Search API is not reindexing when running Cron, but I'm unsure if this is a valid assumption. If it's not, I'd like to set up a nightly reindexing. How do I go about writing this cron task?