The following fixed part will make ES queries fail, it should be ignored if not used/not useful in the case of ES, see
ecm:mixinType != 'HiddenInNavigation' AND ecm:isProxy = 0
AND ecm:isCheckedInVersion = 0 AND ecm:currentLifeCycleState != 'deleted'
AND SORTED_COLUMN IS NOT NULL
(SORTED_COLUMN is unknown to the parser)