|
||
Information about the content specified for an index is stored in a physical index file on the local disk. The index files are located in ~/App_Data/CMSModules/SmartSearch/<Index code name> within your web project's folder.
Documents, forums and other objects in Kentico CMS are reflected in the index file as index documents. The data structure of the index documents is much more suitable for being searched through, resulting in significantly higher search performance compared to linear SQL search.
The index documents may contain fields that the corresponding Kentico CMS objects contain, based on the settings made on each object type's Search fields tab. Depending on these settings, a representation of the object is created in the index file by the Index writer. When an object included in the index is created, removed or has one of its fields modified, the index document is updated. The Index searcher, on the other hand, searches through the index file and returns the relevant results from it.
Brief example
Let's take the following model scenario to explain the life cycle of a document in the index file:
1. A new document is created and stored in the database. When the fields to be indexed are defined for the document type, a new indexing task is logged in the database upon the document's creation.
2. The Smart search checks the database automatically on a regular basis for the presence of indexing tasks.
3. When the Smart search module finds the task, it processes it and the new document is added to the index.
4. Now a user comes to the site and sends a search request via some Smart search web part.
5. The request gets passed to the Smart search module.
6. It modifies the request into a searchable form, searches the index and returns results based on what was found in the index.