title: Elasticsearch “data”: { “type”: “float” } query returns incorrect results
body: <p>I have a query like below and when date_partition field is &quot;type&quot; =&gt; &quot;float&quot; it returns queries like 20220109, 20220108, 20220107.
  When field &quot;type&quot; =&gt; &quot;long&quot;, it only returns 20220109 query. Which is what I want.</p>
  <p>Each queries below, the result is returned as if the query 20220119 was sent.
  --&gt; 20220109, 20220108, 20220107</p>
  <pre><code>PUT date
  {
    &quot;mappings&quot;: {
      &quot;properties&quot;: {
        &quot;date_partition_float&quot;: {
          &quot;type&quot;: &quot;float&quot;
        },
        &quot;date_partition_long&quot;: {
          &quot;type&quot;: &quot;long&quot;
        }
      }
    }
  }
  POST date/_doc
  {
    &quot;date_partition_float&quot;: &quot;20220109&quot;,
    &quot;date_partition_long&quot;: &quot;20220109&quot;
  }
  #its return the query
  GET date/_search
  {
    &quot;query&quot;: {
      &quot;match&quot;: {
        &quot;date_partition_float&quot;: &quot;20220108&quot;
      }
    }
  }
  #nothing return
  GET date/_search
  {
    &quot;query&quot;: {
      &quot;match&quot;: {
        &quot;date_partition_long&quot;: &quot;20220108&quot;
      }
    }
  }
  </code></pre>
  <p>Is this a bug or is this how float type works ?
  2 years of data loaded to Elasticsearch (like day-1, day-2) (20 gb pri shard size per day)(total 15 TB) what is the best way to change the type of just this field ?
  I have 5 float type in my mapping, what is the fastest way to change all of them.
  Note: In my mind I have below solutions but I'm afraid it's slow</p>
  <ul>
  <li>update by query API</li>
  <li>reindex API</li>
  <li>run time search request (especially this one)
  Thank you!
  <a href="https://i.stack.imgur.com/1uic3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1uic3.png" alt="enter image description here" /></a></li>
  </ul>