title: Elastic Search: Query string and number not always returning wanted result
body: <p>We have an elastic search 5.5 setup. We use nest to perform our queries through C#.</p>
  
  <p>When executing the following query:</p>
  
  <blockquote>
  <pre><code>{
    "query": {
      "bool": {
        "must": [
          {
            "query_string": {
              "query": "00917751"
            }
          }
        ]
      }
    }
  }
  </code></pre>
  </blockquote>
  
  <p>We get the desired result: one result with that the number as identifier.</p>
  
  <p>When executing the query:</p>
  
  <blockquote>
  <pre><code>{
    "query": {
      "bool": {
        "must": [
          {
            "query_string": {
              "query": "917751"
            }
          }
        ]
      }
    }
  }
  </code></pre>
  </blockquote>
  
  <p>We get no results.</p>
  
  <p>The value we are searching for is in the field searchIndentifier, and has the value "1-00917751".</p>
  
  <p>We have a custom analyzer called "final"</p>
  
  <blockquote>
    <p>.Custom("final", cu => cu
                                    .Tokenizer("keyword").Filters(new List() { "lowercase" }))</p>
  </blockquote>
  
  <p>The field searchIndentifier has no custom analyzer set on it. I tried adding the whitespace tokenizer in it but that made no difference.</p>
  
  <p>Another field called "searchObjectNo" does work, when I try to search for the value "S328-25" with the query "S328". These fields are exactly the same.</p>
  
  <p>Any ideas here?</p>
  
  <p>Another related question:
  When executing the query</p>
  
  <blockquote>
  <pre><code>{
    "query": {
      "bool": {
        "must": [
          {
            "query_string": {
              "query": "1-00917751"
            }
          }
        ]
      }
    }
  }
  </code></pre>
  </blockquote>
  
  <p>we get a lot of results. I would like this to return only 1 result. How would we accomplish this?</p>
  
  <p>Thank you
  Schoof</p>
  
  <p>Settings and mapping: <a href="https://jsonblob.com/9dbf33f6-cd3e-11e8-8f17-c9de91b6f9d1" rel="nofollow noreferrer">https://jsonblob.com/9dbf33f6-cd3e-11e8-8f17-c9de91b6f9d1</a></p>