How to implement an autocomplete functionality with an existing ElasticSearch index?

Hello all, this is my first post in this forum. So here it goes :slight_smile:

The ES index consists of 2 types that are implicitly mapped (default
mapping). One type is "person" or an author, the 2nd type is "document".
The index has some 500k entries.
What I have to do is: implement an autocomplete (suggestions)
functionality where only the fields "title", "classification" (document)
and "name" (author) are relevant for the suggestions shown to the user.

Could it be done without changing the 500k docs in the index?
I found some tutorials that suggest preparing a specific mapping and
also altering the documents (this I want to avoid if possible) and so on
but I am new to this and I am not sure how to go about the this
problem?
Below is the JSON for the index, and how the documents look:

A Document document:

{ "rawsource": "Phys.Rev. D67 (2003) 084031", "pubyear": 2003, "citedFrom": 19, "topics": [{ "name": "General Relativity and Quantum Cosmology" }], "cited": [{ "ref": 0, "id": "PN132433" }, { "ref": 1, "id": "PN206900" }], "id": "PN120001", "collection": "PN", "source": "Phys Rev D", "classification": "Physics", "title": "Observables in causal set cosmology", "url": "http://arxiv.org/abs/gr-qc/0210061", "authors": [{ "name": "Brightwell, Graham" }, { "name": "Dowker, H. Fay" }, { "name": "Garcia, Raquel S." }, { "name": "Henson, Joe" }, { "name": "Sorkin, Rafael D." }] }

A Person Document:
{ "name": "Terasawa, M.", "documents": [{ "citedFrom": 0, "id": "PN039187" }], "coAuthors": [{ "name": "Famiano, M. A.", "count": "1" }, { "name": "Boyd, R. N.", "count": "1" }], "topics": [{ "name": "Astrophysics", "count": "1" }] }

The mapping is implicit/default, couldn't paste it here cause comment gets longer than 5k chars..

The implementation is to be done using JAVA and the Vaadin Framework
(this is not relevant at this point, but examples in Java/Vaadin will be most welcomed).
Thanks.

You can use anything except the completion suggester, as it needs explicit mappings - https://www.elastic.co/guide/en/elasticsearch/reference/2.3/search-suggesters.html