Implement sorting on entities and relation indexes.
Use celery beat.