Issue using Order By in Lucene query

My goal is to sketch a bar graph in Grafana that shows the duration of the jobs from Longest to Shortest duration.

I am using Order By JobsDuration in the query

{“find”: “terms”, “field”: “JobsDuration”, “orderBy”: “doc_count”}

Here is the error that gets thrown by Grafana

parse_exception: Encountered " <RANGE_GOOP> "“JobsDuration”, “” at line 1, column 9. Was expecting: “TO”