Search Customization: How the Search in DACs Works
The search in records of data access classes (DACs) is built on top of the database search engine. The search process can be divided into the following stages:
- A user initiates the creation of the search index on the Rebuild Full-Text Entity Index (SM209500) form. (For details on how to do this, see Search Indexes: To Rebuild Search Indexes.) The system caches the DAC content in the SearchIndex DAC. The respective database table stores the cached content of some of the DAC properties as text. The index in this table references the indexed DAC by its NoteID.
- When a user updates, removes, or creates a record of the indexed DAC, the system updates the search index for this record. The index is rebuilt when the changes are persisted to the database. The mechanism implemented in the PXSearchable attribute is responsible for the update of the search index for the DAC whose NoteID field contains a declaration of the attribute.
- When a user searches for text by using the universal search, the system looks through the cached content in the SearchIndex table. If the full-text search feature is installed in the database server, this feature is used to find matching entries. Otherwise, the system uses the SQL LIKE operator.