# Sort Options

Sort options are managed through the administration interface and stored in the database. Each sort option has:

* A display label shown to users
* A value used in API requests

The default sort option is determined by the database configuration. When a sort option is selected, its `elasticsearch_value` is used to construct the Elasticsearch query's sort clause.

Sort options can be configured to sort by price (with inventory strategy support), discount amounts, custom attributes, or other product fields.


---

# 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://apidocs.akinon.com/commerce-openapis/search/introduction/sort-options.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.
