# Multiple filed sorting does not work

**URL:** <https://discuss.elastic.co/t/multiple-filed-sorting-does-not-work/224110>\
**Category:** Elasticsearch\
**Tags:** ccs-cross-cluster-search\
**Created:** [March 18, 2020, 12:52pm UTC](https://discuss.elastic.co/t/multiple-filed-sorting-does-not-work/224110 "2020-03-18T12:52:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![neeraj142](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/neeraj142/32/85199_2.png) [@neeraj142](https://discuss.elastic.co/u/neeraj142)\
**Post date:** [March 18, 2020, 12:52pm UTC](https://discuss.elastic.co/t/multiple-filed-sorting-does-not-work/224110/1 "2020-03-18T12:52:45Z")

</div>

mapping for the index

```auto
{
  "settings": {
    "analysis": {
      "analyzer": {
        "my_analyzer": {
          "type": "standard"
        }
      }
    }
  },
  "mappings": {
    "properties": {
      "category": {
        "type": "text",
        "analyzer": "standard"
      },
      "coordinates": {
        "type": "geo_point"
      },
      "businessHours": {
        "type": "nested",
        "properties": {
          "dayStartTime": {
            "type": "date"
          },
          "dayEndTime": {
            "type": "date"
          }
        }
      },
      "followersCount": {
        "type": "integer",
        "coerce": false
      },
      "averageRating": {
        "type": "float",
        "coerce": false
      },
      
    }
  }

```

sorting on multiple fields

```auto
sort=[
    {
      followersCount: {
        order: 'desc'
      }
    },
    {
      averageRating: {
        order: 'desc'
      }
    },
    {
      _geo_distance: {
        coordinates: [
          lng,
          lat
        ],
        order: "asc",
        unit: "km",
        distance_type: "arc",
        ignore_unmapped: true
      }
    },
  ]

```

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [March 29, 2020, 9:07pm UTC](https://discuss.elastic.co/t/multiple-filed-sorting-does-not-work/224110/2 "2020-03-29T21:07:03Z")

</div>

> Multiple filed sorting does not work

What do you mean by this? What results do you get and what do you expect to get?

---

<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:** [April 26, 2020, 9:07pm UTC](https://discuss.elastic.co/t/multiple-filed-sorting-does-not-work/224110/3 "2020-04-26T21:07:04Z")

</div>

Closed on April 26, 2020, 9:07pm UTC

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