I'm extremely new to elastic search
I'm trying to understanding the below code :
List<Hit<Talk, Void>> hits = result.getHits(Talk.class);
for (Hit<Talk, Void> hit: hits) {
Talk talk = hit.source;
log.info(talk.getTitle());
}
This is directly taken from : https://www.elastic.co/blog/found-java-clients-for-elasticsearch
My question is , how does Java know what field to map to what variable.
Essentially , how does Java know , say to match the property "title" to the member variable "title" of the Talk class.
Cheers