title: Cannot sort search results within nested objects in Elasticsearch 7
body: <p>I want to sort objects in ascending order but the sort doesn't work.</p>
  <p>Here is a sort query below.</p>
  <pre><code>&quot;sort&quot;:[
  {
      &quot;category.position&quot;: {
          &quot;order&quot;:&quot;asc&quot;,
          &quot;mode&quot;:&quot;min&quot;,
          &quot;nested&quot;: {
              &quot;path&quot;: &quot;category&quot;,
              &quot;filter&quot;: {
                  &quot;term&quot;: {&quot;category_category_id&quot;:42} }
          }
      }
  }]
  </code></pre>
  <p>And here are the objects below.</p>
  <pre><code>&quot;name&quot;: &quot;Yeti&quot;,
  &quot;category&quot;: [
          {
          &quot;category_id&quot;: 42,
          &quot;name&quot;: &quot;Raamiga&quot;,
          &quot;position&quot;: 3
          },
      ],
  &quot;name&quot;: &quot;Venus&quot;,
  &quot;category&quot;: [
          {
          &quot;category_id&quot;: 42,
          &quot;name&quot;: &quot;Raamiga&quot;,
          &quot;position&quot;: 4
          }
      ],
  </code></pre>
  <p>Please, help! Many thanks in advance!</p>