How can I order search results by the post date? I want to order my search results by the post date (not the created on date).  And, this did not work...

{% if entries|length %}
    {% for post in entries.groupBy('postDate') %}
        {% include 'partials/card-standard-4' %}
    {% endfor %}                            
{% else %}
    &lt;p&gt;Your search for “{{ query }}” didn’t return any results.&lt;/p&gt;
{% endif %}
{% set entries = craft.entries.orderBy('foo').all() %}


There is an orderBy property you can use on the query