title: Ignore spaces in Elasticsearch
body: <p>For my search I want to take into account the fact that the <code>"space"</code> character is not mandatory in a filter request.<br>
  For exemple:<br>
  when I filter on <code>"THE ONE"</code> I see the corresponding document.<br>
  I want to see it even if I write <code>"THEONE"</code>.<br>
  This is how my query is built today:</p>
  
  <pre><code>boolQueryBuilder.must(QueryBuilders.boolQuery()
       .should(QueryBuilders.wildcardQuery("description", "*" + 
           searchedWord.toLowerCase() + "*"))
       .should(QueryBuilders.wildcardQuery("id", "*" + 
           searchedWord.toUpperCase() + "*"))
       .should(QueryBuilders.wildcardQuery("label", "*" + 
           searchedWord.toUpperCase() + "*"))
       .minimumShouldMatch("1"));
  </code></pre>
  
  <p>What I want is to add this filter: (<a href="https://medium.com/@davedash/writing-a-space-ignoring-autocompleter-with-elasticsearch-6c3c28e3a974" rel="nofollow noreferrer">Writing a space-ignoring autocompleter with ElasticSearch</a>)</p>
  
  <pre><code>"word_joiner": {
    "type": "word_delimiter",
    "catenate_all": true
  }   
  </code></pre>
  
  <p>But I don't know how to do this using the API.
  Any idea?<br>
  Thanks!<br><br>
  <strong>EDIT</strong>: Following @raam86 suggestion, I added my own custom analyzer:</p>
  
  <pre><code>{
      "index": {
        "number_of_shards": 1,
        "analysis": {
          "filter": {
            "word_joiner": {
              "type": "word_delimiter",
              "catenate_all": true
            }
          },
          "analyzer": {
            "custom_analyzer": {
              "type": "custom",
              "tokenizer": "standard",
              "filter": [
                "word_joiner"
              ]
            }
          }
        }
      }
  }
  </code></pre>
  
  <p>And here is the document:</p>
  
  <pre><code>@Document(indexName = "cake", type = "pa")
  @Setting(settingPath = "/elasticsearch/config/settings.json")
  public class PaElasticEntity implements Serializable {
     @Field(type = FieldType.String, analyzer = "custom_analyzer")
      private String maker;
  }
  </code></pre>
  
  <p>Still not working...                  </p>