Elasticsearch returns empty json-objects

I'm just getting started with elasticsearch with spring which is both technologies wich are completly new to me. I have uploaded data to an elasticseach index with logstash and I can search it successfully using kebana. However when i try to return from an index to a webpage using spring it only returns empty json-objects, but the right amount of empty objects. Did I upload the data incorrectly or is something wrong with my code? I don't understand why this is happening and would appriciate any help I can get. You can find some code bellow.

Code for type:
@Document(indexName="usmgbg_index", type="usmgbg_type")
public class Usmgbg {

private String ID;
private String Source, Name, Profession, Country, FileName, LastModified, OwnerID;


public interface UsmgbgRepository extends ElasticsearchRepository<Usmgbg, String>{}

public class UsmgbgController {
private UsmgbgRepository repository;

    public List<Usmgbg> findAllCustomers() {

        List<Usmgbg> items = new ArrayList<>();

        return items;

The output I'm getting from findAllCustomers looks like: [{},{},{},{},....]

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.