Appendix B: Application Properties
This section lists the application properties that are relevant to the full-text search add-on.
- cuba.ftsConfig
-
Additive property defining an FTS configuration file of the project.
The file is loaded using the
Resources
interface, so it can be located in classpath or in the configuration directory.Used in the Middleware block.
Example:
cuba.ftsConfig = +com/company/sample/fts.xml
- cuba.gui.genericFilterFtsTableTooltipsEnabled
-
The flag enables the tooltip generation in Table and DataGrid components. The tooltip contains an information in which entity attribute the search term was found. Tooltip generation may take quite a lot of time, so it is disabled by default.
Interface:
ClientConfig
Stored in the database
Default value:
false
- cuba.gui.genericFilterFtsDetailsActionEnabled
-
The flag enables the "Full-Text Search Details" context action in a table or data grid when a full-text search is done using the generic filter component.
Interface:
ClientConfig
Stored in the database
Default value:
true
All properties that are described below are runtime parameters stored in the database and available in the application code via the FtsConfig
configuration interface.
- fts.enabled
-
The flag enabling the FTS functionality in the project.
Can be changed via the Enabled attribute of the
app-core.fts:type=FtsManager
JMX bean.Default value:
false
- fts.indexDir
-
An absolute path to the directory storing indexed files. If not specified, the
ftsindex
subdirectory of the application work directory (defined by the cuba.dataDir property) is used; in the default deployment configuration, it is tomcat/work/app-core/ftsindex.Default value: unspecified
- fts.indexingHosts
-
A pipe-separated list of hosts that should maintain search index in the cluster. Each host is represented by its Server ID.
For example:
cuba.fts.indexingHosts = host1:8080/app-core|host2:8080/app-core
Default value: unspecified, which means that queueing and indexing is performed by the current server alone.
- fts.indexingBatchSize
-
A number of records extracted from the indexing queue per one invocation of
processQueue()
.This limitation is relevant to the situation when the indexing queue contains a very large number of records, for example, after executing the
reindexAll()
method of theapp-core.fts:type=FtsManager
JMX bean. In this case, indexing is done in batches, which takes more time, but creates a limited and predictable server load.Default value:
300
- fts.reindexBatchSize
-
A number of records put to the indexing queue per one invocation of
reindexNextBatch()
.Default value:
5000
- fts.maxNumberOfSearchTermsInHitInfo
-
The maximum number of times the search term will be added to the hit info for each field. For example, there is a FileDescriptor entity field. If the
fts.maxNumberOfSearchTermsInHitInfo
property value is 2, then only two first occurrences of the search term in the file will be added to the hit info. The same is for all other indexed entity fields.Default value:
1
- fts.maxSearchResults
-
The maximum number of entries in the search result.
Default value:
100