Condition order_by and query to haystack selected engine