How can I change the list order on search result?

Hi,

I want to customize the search result in product->article->page order.

How can I do that? I have tried some ways but it always showed page first.

I am using Debut theme.

Here is my current code in search.liquid

{% for item in search.results %}
{% if item.object_type == ‘product’%}

  • {% include 'product-card-list', product: item %} {% else %}
    {{ item.title }}
    {% unless item.image == null %} {{ item.image.alt | escape }} {% endunless %}
    {{ item.title }}
    {% if item.published_at %}{{ item.published_at | date: format: "date" }} — {% endif %} {{ item.content | strip_html | truncate: 200 }}
    {% endif %}
  • {% endfor %}

    If anyone can help would be great, thanks in advance.