# Ordering

![](/files/-MXqUiNXDt8PPLQBvjRd)

### Primary ordering

This is used first, when fetching the results.

### Secondary ordering

When the primary ordering of matching results is the same, then the secondary ordering is used.

Ex.:  Primary -> Relevance, Secondary -> Date descending\
Result1 and Result2 has the same relevance, so the secondary ordering kicks in, and orders by the date published descending.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.ajaxsearchlite.com/general-options/ordering.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
