I am using annotation @CompletionField from Spring Data Elasticsearch (4.0.1 RELEASE) in my entity, but it looks the ElasticSearch index is created with wrong mapping.
Entity
@Document(indexName="address")
public class Address {
@CompletionField
private String cityName;
}
Repository
@Service
public interface AddressRepository extends ElasticsearchRepository<Address, String> {
}
Index is autocreated by calling repository.save(address)
Snippet from elasticsearch mapping
"cityName":{"type":"text","fields":{"keyword":{"type":"keyword","ignore_above":256}}}
As you can see there is missing type "completion" (see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters.html#completion-suggester).
Did I miss something?