Creating an index

  Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic! Mail us feedback on this topic!  

Information about the content of your site are stored in indexes. You need to have the content of your site indexed in order for it to be searchable using the Smart search module.

 

There are two types of indexes:

 

Documents index - stores information about the content of documents in your content tree
Forums index - stores information about the content of discussion forums on your site

 

The following example shows the general procedure how an index can be created and what options you have when creating it. The procedure is applicable for both document and forum indexes, while differences between the two are noted in the text.

 

1. Go to Site Manager -> Administration -> Smart search and click the New index (NewIndex) link. The New search index dialog will be displayed to you. You will be asked to enter the following details:

 

Display name: name of the index displayed in the administration interface
Code name: name of the index used in web site code (the fully qualified file name must be less than 260 characters long, the directory name must be less than 241 characters long)
Analyzer type: type of analyzer that will be used when indexing the content of your site, the following types are available:
Standard - grammar-based analyzer (stop-words, shortcuts, ...), very efficient for English, but need not produce satisfactory results with other languages
Simple - divides text at non-letter characters
Stop - contains a collection of stop-words at which it divides the text
White space - divides text at whitespaces
Index type: type of content to be indexed
Documents - indexes content of documents in the content tree
Forums - indexes content of discussion forums
Assign index to site <sitename> - if checked, the index will be assigned to the site whose name is displayed

 

Click OK.

 

devguide_clip0133

 

2. You will be redirected to the index's editing interface. The General tab, which you will be redirected to, shows the same details that you just entered. Notice the info box on the right, which shows general information about the index.

 

The following two action can also be performed on this tab, but it would make no sense to perform them at this stage of creating a new index:

 

Rebuild (RebuildIndex) - deletes the original index and the specified content gets indexed again; the index is automatically optimized after successful rebuild
Optimize (OptimizeIndex) - de-fragments the index, which results in better search performance, particularly in case of large indexes

 

devguide_clip0134

 

3. Switch to the Index tab. This is where you define what content or forums will be indexed. The content of this tab depends on the type of index that you are creating. Detailed information about defining index content is given in Defining document index content and Defining forums index content.

 

devguide_clip0699

 

4. Now switch to the Sites tab. Make sure that the index is assigned to the appropriate web site. You may also want to optionally assign the index to some other site in order to have multi-site search results.

 

Click Save.

 

devguide_clip0136

 

5. Switch to the Cultures tab (not available for forum indexes). This is where you can choose which cultural versions of the site will be indexed by this index. Choose the cultural version(s) that you want to be indexed. If you have a multi-site index, you can select the cultures separately for each site chosen by the Select site drop-down.

 

Click Save when you have all the cultures selected.

 

devguide_clip0137

 

6. Finally, go back to the General tab and choose to Rebuild (RebuildIndex) the index. This needs to be done only for the first time. Any further changes made to the site will be indexed automatically.

 

Page url: http://devnet.kentico.com/docs/devguide/index.html?smart_search_creating_index.htm