If you have configured a sort-by attribute on a standard replica or primary index, the expected behavior for nearly all index configurations would be for your results to be sorted according to the value of that attribute.
For example, let's say your sort-by attribute is price and you've selected Descending for the sort order. If you search for "trash cans", you would expect the most expensive results to appear first.
The most noteworthy exception to this behavior is if you have set your index's typo tolerance configuration to strict.
You can find your typo tolerance settings in the Algolia dashboard by navigating to Search > Configuration > Typo-tolerance
With this setting enabled, results with the fewest and second fewest typos are returned, and it also moves the typo ranking criterion to the top of the ranking formula, placing it above your sort-by attribute and causing it to be evaluated first.
If your results are not following the order specified by your sort-by attribute, check whether typoTolerance is set to strict. In most cases, changing it back to the default value of true, which is recommended for most use cases, will restore the sort-by attribute as the top ranking criterion and allow results to be ordered as expected.
You can learn more about this strict setting in our docs.