I am building a Spring Boot application with elastic search and PostgreSQL.I am using PostgreSQL for writing purposes and elastic search for reading purposes. but I have stuck on some points.:
- Is we need to write separate model(POJO) classes for elastic search and PostgreSQL? because we are using ElasticsearchRepository for elastic search and JpaRepository.
- And also the annotations for elastic search are different and annotations for PostgreSQL are different on model classes.
Any body have idea what is the spring boot project structure where elastic search is used for reading purposes and PostgreSQL used for writing purposes.