title: Elasticsearch : Completion suggester not working with whitespace Analyzer
body: <p>I am new to Elastic search and I am trying to create one demo of <strong>Completion suggester</strong> with <strong>whitespace Analyzer</strong>. </p>
  
  <blockquote>
    <p>As per the documentation of <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-whitespace-tokenizer.html" rel="noreferrer">Whitespace Analyzer</a>, It breaks text
    into terms whenever it encounters a whitespace character. So my
    question is do it works with Completion suggester too?</p>
    
    <p><strong>So for my completion suggester prefix : "ela",</strong> <strong>I am expecting output
    as "Hello elastic search."</strong></p>
  </blockquote>
  
  <p><strong>I know an easy solution for this is to add multi-field input as :</strong></p>
  
  <pre><code>"suggest": {
           "input": ["Hello","elastic","search"]
   }
  </code></pre>
  
  <blockquote>
    <p><strong>However, if this is the solution then what is meaning of using analyzer? Does analyzer make sense in completion suggester?</strong></p>
  </blockquote>
  
  <p>My mapping : </p>
  
  <pre><code>{
    "settings": {
      "analysis": {
        "analyzer": {
          "completion_analyzer": {
            "type": "custom",
            "filter": [
              "lowercase"
            ],
            "tokenizer": "whitespace"
          }
        }
      }
    },
    "mappings": {
              "my-type": {
                  "properties": {
                      "mytext": {
                          "type": "text",
                          "fields": {
                              "keyword": {
                                  "type": "keyword",
                                  "ignore_above": 256
                              }
                          }
                      },
                      "suggest": {
                          "type": "completion",
                          "analyzer": "completion_analyzer",
                          "search_analyzer": "completion_analyzer",
                          "max_input_length": 50
                      }
                  }
              }
          }
  }
  </code></pre>
  
  <p>My document : </p>
  
  <pre><code>{
      "_index": "my-index",
      "_type": "my-type",
      "_id": "KTWJBGEBQk_Zl_sQdo9N",
      "_score": 1,
      "_source": {
          "mytext": "dummy text",
          "suggest": {
                   "input": "Hello elastic search."
          }
      }
  }
  </code></pre>
  
  <p>Search request : </p>
  
  <pre><code>{
      "suggest": {
          "test-suggest" : {
          "prefix" :"ela", 
          "completion" : { 
              "field" : "suggest",
              "skip_duplicates": true
          }
          }
      }
  }
  </code></pre>
  
  <p><strong>This search is not returning me the correct output, but if I use prefix = 'hel' I am getting correct output : "Hello elastic search."</strong></p>
  
  <p>In brief I would like to know is whitespace Analyzer works with completion suggester?
  and if there is a way, can you please suggest me.</p>
  
  <p>PS: I have already look for this links but I didn't find useful answer.</p>
  
  <p><a href="https://stackoverflow.com/questions/39209957/elasticsearch-completion-suggester-standard-analyzer-not-working">ElasticSearch completion suggester Standard Analyzer not working</a></p>
  
  <p><a href="https://stackoverflow.com/questions/24899480/what-elasticsearch-analyzer-to-use-for-this-completion-suggester">What Elasticsearch Analyzer to use for this completion suggester?</a></p>
  
  <p>I find this link useful <a href="https://stackoverflow.com/questions/41744712/word-oriented-completion-suggester-elasticsearch-5-x/41800102#41800102">Word-oriented completion suggester (ElasticSearch 5.x)</a>. However they have not use completion suggester.</p>
  
  <p>Thanks in advance.</p>
  
  <p>Jimmy </p>