# Lab Guide: X-Pack Machine Learning - Lab 4 Machine Learning API - Step 5

**URL:** <https://discuss.elastic.co/t/lab-guide-x-pack-machine-learning-lab-4-machine-learning-api-step-5/98379>\
**Category:** Elastic Training\
**Created:** [August 25, 2017, 1:59pm UTC](https://discuss.elastic.co/t/lab-guide-x-pack-machine-learning-lab-4-machine-learning-api-step-5/98379 "2017-08-25T13:59:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![EddieTurizo](https://avatars.discourse-cdn.com/v4/letter/e/8edcca/32.png) [@EddieTurizo](https://discuss.elastic.co/u/EddieTurizo)\
**Post date:** [August 25, 2017, 1:59pm UTC](https://discuss.elastic.co/t/lab-guide-x-pack-machine-learning-lab-4-machine-learning-api-step-5/98379/1 "2017-08-25T13:59:46Z")

</div>

> 1. Get the records back but sorted by the record\_score:

> Do you notice how this sends back the anomalies from least anomalous to most anomalous? We want to sort this so they come back the other way!

When I run this query, my record scores are already in descending order (99.7674 - top, 74.0132 - bottom). Really interested to know if I am doing something wrong?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 24, 2017, 2:02pm UTC](https://discuss.elastic.co/t/lab-guide-x-pack-machine-learning-lab-4-machine-learning-api-step-5/98379/2 "2017-09-24T14:02:58Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
