2.1. Project Setup

  1. Run CUBA Studio, go to Open projectSamples window and download the Library project.

  2. Open the Library project in Studio.

  3. Open Project propertiesEdit, select the fts component in the list of App components and save changes. Confirm when Studio suggests recreating Gradle scripts.

  4. Select RunDeploy. At this point, the application will be assembled and deployed to the Tomcat application server located at build/tomcat.

  5. Create the application database: RunCreate database.

  6. Start the application server: RunStart application server.

  7. Open the application’s web-interface at http://localhost:8080/app. Log into the system with the name admin and password admin.

  8. To enable full text search functionality, open AdministrationApplication properties in the application main menu, find and open the fts list of properties in the table. Open the fts.enabled property using double click and select true in the Current value field.

Once the steps above are completed, full text search functionality will be added to the application and ready to work. If you log out of the system and then log in again, a search field will appear in the top right panel of the main application window. However, search will not produce any results because the data has not been indexed yet.

To start one-off indexing of the current state of the database (i.e. the entities listed in the FTS configuration file by default), open the AdministrationJMX Console, find the app-core.fts:type=FtsManager JMX bean and consequently invoke reindexAll() first and then processQueue(). After this, searching the "adm" string should give the following results:

2.1 project setup