> For the complete documentation index, see [llms.txt](https://documentation.ajaxsearchlite.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.ajaxsearchlite.com/general-options/ordering.md).

# Ordering

Primary and secondary search results ordering

![](https://3760515715-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MOpzRddcYVNgkLN4M3d%2F-MXqSTeEJx2mprfmoatQ%2F-MXqUiNXDt8PPLQBvjRd%2Fimage.png?alt=media\&token=b10e7b9e-28a3-45b9-aab6-4fbe4d13163d)

### 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.
