title: How to search omitting whitespace on elasticsearch
body: <p>Elasticsearch noob here trying to understand something</p>
  
  <p>I have this query</p>
  
  <pre><code>{
    "size": 10,
    "_source": "pokemon.name",
    "query": {
      "bool": {
        "minimum_should_match": 1,
        "should": [
          {
            "multi_match": {
              "_name": "name-match",
              "type": "phrase",
              "fields": ["pokemon.name"],
              "operator": "or",
              "query": "pika"
            }
          },
          {
            "multi_match": {
              "_name": "weight-match",
              "type": "most_fields",
              // I use multi_match because I'm not sure how can I change it to match
              "fields": ["pokemon.weight"],
              "query": "10kg"
            }
          }
        ]
      }
    }
  }
  </code></pre>
  
  <p>The issue is <code>pokemon.weight</code> has a space between the value and the unit <code>10 Kg</code>. So I need to ignore the whitespace in order to match with <code>10kg</code></p>
  
  <p>I've tried to change the tokenizer, sadly it can decide where to split but not to remove a character. Anyway I don't know how to use it and the documentation isn't very helpful, explains the theory but not how to use it.</p>
  
  <p>Thanks! Any learning resource will be much appreciated.</p>