title: Spring-data-elasticsearch @CompletionField does not create field with type "complete"
body: <p>I am using <code>Spring-data-elasticsearch</code> and there <code>ElasticsearchTemplate</code> functions.</p>
  
  <p>I try to create an index by using the <code>@CompletionField</code> annotation on a <code>Completion</code> field named <code>suggest</code>. </p>
  
  <pre><code>@Document(indexName = "city", type = "city")
  public class City {
  
      @Id
      private String id;
  
      @Field
      private String name;
  
      @CompletionField
      private Completion suggest;
  }
  </code></pre>
  
  <p>The <code>@CompletionField</code> annotation should be used to for the suggest-complete functions of elasticsearch. Like described in the java-doc:</p>
  
  <pre><code>/**
   * Based on the reference doc - http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-suggesters-completion.html
   *
   * @author Mewes Kochheim
   */
  @Retention(RetentionPolicy.RUNTIME)
  @Target(ElementType.FIELD)
  @Documented
  @Inherited
  public @interface CompletionField {
  </code></pre>
  
  <p>In the <a href="https://www.elastic.co/guide/en/elasticsearch/reference/5.5/search-suggesters-completion.html#completion-suggester-mapping" rel="noreferrer">elasticsearch docs</a> they say, that the field should have a type <code>complete</code> to use the suggest-complete functions.</p>
  
  <p><strong>But if I create my index unfortunately the field <code>suggest</code> has not the type <code>complete</code> instead it hast the type <code>keyword</code>. Which gives me an error when I try to query a suggest query.</strong></p>
  
  <pre><code>CompletionSuggestionBuilder s = SuggestBuilders.completionSuggestion("suggest").prefix(text, Fuzziness.ONE);
  SuggestBuilder b = new SuggestBuilder().addSuggestion("test-suggest", s);
  SearchResponse response = elasticsearchTemplate.suggest(b, "city");
  </code></pre>
  
  <p>Exception:</p>
  
  <pre><code>java.lang.IllegalArgumentException: no mapping found for field [suggest]
  </code></pre>
  
  <p>All my code is based on the spring-data-elasticsearch git repository. </p>
  
  <p><a href="https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/completion/ElasticsearchTemplateCompletionTests.java" rel="noreferrer">ElasticsearchTemplateCompletionTests.java</a></p>
  
  <p><a href="https://github.com/spring-projects/spring-data-elasticsearch/blob/master/src/test/java/org/springframework/data/elasticsearch/core/completion/CompletionAnnotatedEntity.java" rel="noreferrer">CompletionAnnotatedEntity.java</a></p>
  
  <p>Do I miss any configuration in my <code>City</code> document or any other annotation? </p>