We have a project deployed to an AWS beanstalk as single war deployments over two instances with a single database. FTS was setup and it returns results if I am on one server but no results for the same search string if I am logged into the other.
Is a sync on each individual Tomcat server required to back fill previous data in the database for FTS to work?
Are there any other considerations for this setup to ensure that search returns results for new and old data on both servers?
The recommendations for multi-instance cluster are the following:
For each of the CUBA app-core app instance the Lucene index is stored locally in the file system. Indexes are maintained independently from each other. When using BeansTalk or other cloud deployment, make sure that index storage directory Appendix B: Application Properties - CUBA Platform. Full Text Search is writeable.
When new the application instance is deployed, you will need to initialize Lucene index on this instance (or just copy files from the ftsindex folder on another instance).
It’s necessary to setup system settings, so that indexing is triggered on all cluster instances.
Set application property fts.indexingHosts (com.haulmont.fts.global.FtsConfig#getIndexingHosts), it contains list of cluster instance IDs, where indexing should be run, separated with vertical line letter.
E.g. fts.indexingHosts = app1:8080/app-core|app2:8080/app-core|app3:8080/app-core