title: ElasticSearch: how to reduce the number of results when using ngrams and match query?
body: <p>I'm using this mapping:</p>
  
  <pre><code>  settings index: { number_of_shards: 1, number_of_replicas: 1 }, analysis: {
      analyzer: {
        custom_analyzer: {
          type: "custom",
          tokenizer: "standard",
          filter: ["lowercase", "asciifolding", "custom_unique_token", "custom_tokenizer"]
        }
      },
      filter: {
        custom_word_delimiter: {
          type: "word_delimiter",
          preserve_original: "true"
        },
        custom_unique_token: {
          type: "unique",
          only_on_same_position: "false"
        },      
        custom_tokenizer: {
          type: "nGram",
          min_gram: "3",
          max_gram: "10",
          token_chars: [ "letter", "digit" ]
        }
      }
    } do
      mappings dynamic: 'false' do
        indexes :searchable, analyzer: "custom_analyzer"
        indexes :year
      end
    end
  </code></pre>
  
  <p>And this query (rails app):</p>
  
  <pre><code>search(query: {match: {searchable: {query:params[:text_search], minimum_should_match:"80%"}}, size:100)
  </code></pre>
  
  <p>My main problem, if the app is always returning 100 documents (the max wanted). On these 100 documents, only the 10 or 15 first are relevant. Other docs are very too far from the search word.</p>
  
  <p>I tried to:
  - increase the max_ngram from 3 to 10
  - add the minimum should match up to 99%...
  but I always get 100 results.</p>
  
  <p>I don't really understand, why, for example, if I'm searching "Boucab", il will get 15 great results first, but I will also get "Maucaillou" at the 99th place ? How to reduce the relevance ?</p>
  
  <p>My app is multilingual.</p>
  
  <p>How to not display results with poor scores ? Does I need to use the min_score parameter ? Is-it the only solution ?</p>