package com.hantsylabs.example.spring.model; import org.springframework.data.annotation.Id; import org.springframework.data.annotation.Version; import org.springframework.data.elasticsearch.annotations.Document; @Document(indexName = "conference_idx") public class Post { @Id private Long id; @Version private Long version; private String title; private String content; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Integer getVersion() { return version; } public void setVersion(Integer version) { this.version = version; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } @Override public String toString() { return "Post [id=" + id + ", version=" + version + ", title=" + title + ", content=" + content + "]"; } }