3. User interface

  Here you choose an options file created earlier for your site, which you are going to index, or create a new options file for another site. This file contains indexing options which you set in the Edit Active Options window. To create a new options file, you should edit these options for their correspondence to your site to be indexed, because initially this file is filled with the options of the previous active options file.


  In this window you choose the options file, which corresponds to the site you are going to index, i.e. to create a Search Engine for it. Here you can rename that file, save it under another name and edit it.
  You can also do all this using the New Options File.


  In this window you edit the active options file, i.e. the file of options for your site to be indexed.


  Use the Links tab to choose the method of linking the files the users will look for. It is necessary, since you index files on the local disk, while the Search Engine will work on your web server or on a CD-ROM, to which you will record the site together with the Search Engine.
  For this purpose specify in the Root path of your site... edit box the path to the root of your site on the local disk, i.e. the directory, which you are going to index. Then specify the URL of your site or another directory, where your site will be located (for example, a CD-ROM), in the Replace root path of your site... edit box. When Cronc Search Expert creates the list of index files, it will replace the path specified in the Root path of your site... edit box with the path given in the Replace root path of your site... edit box in the file names. As a result users will find documents on your site, but not on your local disk.
  Suppose you want to index the site C:\web\mysite1\, which has the following URL: http://www.mysite1.com/. The Search Engine is located in the search directory, and the link to your documents' search will be as follows: http://www.mysite1.com/search/search.html. For this purpose create the search directory on the local disk and on your server: C:\web\mysite1\search and http://www.mysite1.com/search.

  Now let's review all methods of linking to the found documents.
  1. You can use relative links (recommended). In the top edit field specify the C:\web\mysite1\ path, and in the bottom field the path from the search directory, where the Search Engine will be located, to the root of your site: ../. In this case the C:\web\mysite1\index.html file will be saved to the search base as ../index.html and the file C:\web\mysite1\partners\index.html will be saved as ../partners/index.html.
  If you store the Search Engine not in the search directory, but in the root of your site (http://www.mysite1.com/search.html), leave the bottom field empty, because when users work with the Search Engine, they are already in the root of your site.
  This linking method is convenient as it does not depend on the location of your site. It can be located at any URL or on a local disk, and depends only on the location of the Search Engine files on your site. If you want to place the Search Engine in the http://www.mysite1.com/work/search directory, then the path to the root of the site in the bottom edit box will be as follows: ../../. There is one more way of setting relative links: writing the URL of the site root in the <HEAD> tag of every document: <BASE href= "http://www.mysite1.com/">. You can insert this line in the search files, generated by the Search Engine. Simply open the Inclusions tab and enter the line in the top input field.
  In this case the top edit box remains unchanged (C:\web\mysite1\), and the bottom edit box is left empty.

  2. You can use absolute links. In this case enter C:\web\mysite1\ in the top edit box and set the http://www.mysite1.com/ path to your site root in the bottom edit box. Local links will be replaced with the true ones in the Search Engine:
C:\web\mysite1\index.html -> http://www.mysite1/index.html and
C:\web\mysite1\partners\index.html -> http://www.mysite1/partners/index.html
If you want to copy a site from the Search Engine to a CD-ROM or another disk, for example to the D:\web\mysite1 directory, enter D:\web\mysite1\ in the bottom edit box. However, you'll find it more convenient to use relative links in this case.


  Use the Files tab to specify extensions of the files to be indexed. Users will be able to find on your site only the file types you specify here, the files with the other extensions won't be indexed and searched. You should specify extensions for the HTML files (html, shtml, php etc.) in the HTML type edit box, and extensions for the other files (txt, doc, rtf, pdf etc.) in the Non-HTML type edit box. The whole text of the non-HTML files will always be indexed.
  Use this tab to specify the maximum number of bytes to be read from any non-HTML file, if the file is too big. It can be necessary to reduce the indexing time of large files.
  The files from all subdirectories will be also indexed, if you check Add files in subdirectories.
  At the bottom of the Files window you can exclude the directories and files which meet the indexing criteria (i.e. have the 'right' extensions), but should not be indexed (e.g. robots.txt), as well as frame containers, from indexing. Using the button you can add several files at once, clicking on their names while holding the Ctrl key. Use the same method to remove several directories and files from the list of non-indexed files. Do not forget to exclude the search directory, where the Search Engine will be located, from indexing.


  Use the Search tab to choose the HTML tags of those documents, from which Cronc Search Expert will take the search words, by which users will search for your files. If you seldom use these tags or they contain not enough search information, check Index whole text. In this case Cronc Search Expert will add out-of-tag words, which occur twice or more in the document, to the base of the search words.
  If you check Index whole text, you can set the maximum number of words to be indexed. (It can be necessary, if your HTML files are too large.) Then the keywords from these words (the words, which can be met at least twice in the text) will be chosen.
  Here you can also specify the maximum length of words that must be added to the base of the search words and pdf files options.


  Use the Inclusions tab to set standard HTML inclusions for the <HEAD> tag of the files with the search results. These HTML inclusions can also be added at the beginning and at the end of these files. It can be, for example, your logo or a banner, which will be seen on each page of the search results.
  If you haven't surrounded the HTML inclusion on the top of page with the <P> and </P> tags or other tags with the similar effect, don't forget to add the <BR> tag at the end of this inclusion, so that the following text would begin on the left edge of the resulting Search Engine-generated page.


  Use the Output tab to specify the full name of your Search Engine starting file. It will be convenient for you to keep the files created by Cronc Search Expert in the search subdirectory of your site, for example
C:\web\mysite1\search. Then you should upload these files into the search subdirectory on your server. Suppose, you name the starting search file
C:\web\mysite1\search\search.html. Then Cronc Search Expert creates in the directory C:\web\mysite1\search the following files:

- search.html - your Search Engine initial file and also the navigator through your site, which contains the base of the search words and the URLs of all indexed files
- search-help.html - the help file for your users
- search-search.css - cascading style sheets file for the Search Engine

  Users will open the found documents in the new window, provided that you check Open searched documents in new window. Otherwise the found documents will be opened in the current window.
  You can also set the maximum number of the links - number of the found documents on the search page.

  The links are sorted by relevance on the pages with the search results. I.e. the links that match the search string best of all will be shown first. For this purpose all the keywords, collected by Cronc Search Expert from your documents, will be divided into three parts according to their importance:
- the words, which occur in the Title meta tag;
- the words, which occur in the Description meta tag;
- the words, which occur in the Keywords meta tag and in the document body.

  You can set your own criteria of relevance, changing values in the Title weight and Description weight input fields. The numbers in these fields denote the weight of each search word contained in the Title and Description meta tags. The weight of the words from the document body is taken as 1. The found documents are sorted in the descending order according to the sum of weights of keywords found in them.
  For example, let us assume that the weight of a word from the Title meta tag is 4, and the weight of a word from the Description meta tag is 2. Suppose that a user entered the words key1 key2 in the search box. The page1.html page of your site contains the word key1 in its Title, and it gives it 4 points. If the word key1 is also in the Description, it gives it 2 more points. If the word key1 is found in the body of page1.html, it gives it 1 more point.
  Assume that the page2.html file contains the words key1 and key2 in the body. They bring it 2 points. As a result the link to page1.html with 7 points will be shown higher in the list than page2.html with 2 points. It can happen, that the page page1.html will get more points than the page page2.html, although it contains less search words. This happens because the words are found in the Title and Description tags. In this case the page1.html link will be shown before the page2.html link on the results page. If you want to avoid this, you should set all weights to 1. If any search word occurs more than once in any part of the document only the first entry is taken into account.


  Having indexed the whole site, you should create your Search Engine files, and then upload them onto your server. For example, if you create the Search Engine files in the C:\web\mysite1\search directory, it is obvious, that you should upload them into the http://www.mysite1.com/search directory.


  Here you can test your Search Engine.
  If you have set relative links on the Links tab of the Edit options file window, as it is written in Section 1 of the Links chapter, you can test the Search Engine locally. If you have chosen another way of setting the links, you should first clear both edit boxes, test the search engine, enter the necessary values in these edit boxes again and click the button one more time.


  This item of the menu gives you an opportunity to re-index the modified files and add new files to the search base quickly. Here you can also edit the search information by double-clicking the line with the chosen file, or remove files from the base by pressing the Del key.
  To load the search base you should specify the index file, which is usually called search.html. The search base will be loaded to the table from this file. In the File Name column the + symbol will precede the names of these files, and in the target path the forward slash will be instead of the back slash (if you generate the Search Engine for a local disk only). Having done this, you can index files and directories, as you've done it earlier, and rewrite the old Index File.
  You should not care about removal of the data from the old versions of your files, marked with +, from the table. When the Index File is created, these lines won't be written into the base and will be automatically deleted from the table. The program determines such files according to the File Name column, where the target path of the indexed files is written. That is why you should be attentive using Load Index File: data in the options of the current site File/Edit Options File/Links should be the same as during the previous indexing.


  You can very easily reindex all files of the current project which were renewed. To accomplish this click the "Reindex Updated Files" button and enter the date & time of files modified. All files of the current project that were modified later than the date provided will be reindexed and the index file with the updated information will be saved on the disk. Files are not required to be presented in the table of indexed files on the main form of the program for the file indexation.
  Cronc Search Expert finds files to be reindexed by reading output file and according to "Root path of your site on the local disk" option (see "Edit Options File" menu item).


  This function allows you to update the index file, without modifying any of the layout changes you may have made to your search page. The function "Make Index File" creates a new search page with a standard layout, based on the list of files currently on the program window. This function does the same, but uses no standard layout. It will only update the index array in the search file, and leave any layout modifications unchanged. After clicking the button, Cronc Search Expert will ask for the filename of your search page, and will replace the index array in this search page with a new one.


  Use the Actions Menu to add new files and directories to the search base or delete indexed files from the list, but all your files remain on the disk.


  Adds a new entry to the list of the files to be indexed. Multiple selection is supported (hold the Ctrl key and click multiple files to select them). Most likely, using the Add Folder item you will be able to index the whole site at once.


  Use this item to index the contents of a directory. If the Add files in subdirectories option is on, the files from all subdirectories will be indexed. Most likely, making Add Folder once will be enough for you to index the whole site.


  Deletes the selected file from the list of the indexed files (the file is not removed from the disk). You can also use Del.


  Clears the whole list of the indexed files. After that you can index other sites, choosing their own options files.


  In the opened window you get two types of links to the search form: as a simple link and as a form to be inserted into your documents. It may be to edit the path to the starting search.html file. After that you can insert the chosen link in the documents using Windows clipboard.