title: How to filter by score in Elastic KNN search?
body: <p>I have index with following mapping:</p>
  <pre><code>{
    &quot;test-2&quot;: {
      &quot;mappings&quot;: {
        &quot;properties&quot;: {
          &quot;advert_id&quot;: {
            &quot;type&quot;: &quot;integer&quot;
          },
          &quot;fraud&quot;: {
            &quot;type&quot;: &quot;boolean&quot;
          },
          &quot;photos&quot;: {
            &quot;properties&quot;: {
              &quot;id&quot;: {
                &quot;type&quot;: &quot;integer&quot;
              },
              &quot;vector&quot;: {
                &quot;type&quot;: &quot;dense_vector&quot;,
                &quot;dims&quot;: 3,
                &quot;index&quot;: true,
                &quot;similarity&quot;: &quot;l2_norm&quot;
              }
            }
          },
          &quot;rating&quot;: {
            &quot;type&quot;: &quot;long&quot;
          }
        }
      }
    }
  }
  </code></pre>
  <p>Here is how my data is saved in Elastic:</p>
  <pre><code> {
      &quot;advert_id&quot;: 123,
      &quot;fraud&quot;: true,
      &quot;photos&quot;: [
        {
          &quot;id&quot;: 456,
          &quot;vector&quot;: [
            213.32,
            3.23,
            4.21
          ]
        }
      ]
    }
  </code></pre>
  <p>I want to search data with similar vectors according to KNN algorithm. Here is my query for that:</p>
  <pre><code>GET /test-2/_knn_search
  {
    &quot;knn&quot;: {
      &quot;field&quot;: &quot;photos.vector&quot;,
      &quot;k&quot;: 1,
      &quot;num_candidates&quot;: 5,
      &quot;query_vector&quot;: [213.32, 3.23, 4.22]
    }
  }
  </code></pre>
  <p>Elastic returns me a score per each hit. Question is how can I get data with score more than <code>N</code>? It know about <code>min_score</code>, but couldn't apply it in this query.</p>