I found, that the _ordering parameter for the /search/{search_model_pk}/
does not work. Please consider the following python sample:
import requests
r = requests.get(url='https://.../api/v4/search/documents.documentsearchresult/?q=.*&_ordering=-label', auth=(...)).json()
for r in r['results']:
print(r['label'])
# output
# 1.pdf
# 2.pdf
# 3.pdf
This code is printing document labels but does not order them as wanted.
When doing the same for the documents
endpoint, everything is working as expected:
r = requests.get(url='https://.../api/v4/documents/?_ordering=-label', auth=(...)).json()
# output
# 3.pdf
# 2.pdf
# 1.pdf
What is wrong with my sample?
Thanks, Torsten