CNSearch is comprised of two parts - an indexer and a search module module. The indexer analyses a web-site (or a group of sites) where one are going to search and creates an index file; the Search module performs a quick search in the created index file.
To start the indexing one should perform the following actions:
there localhost is a name of a job, and http://localhost/my_site is the web-site address.
Example for Windows:
C:\indexer.exe localhost
or
C:\indexer.exe --config=D:\www\search.conf localhost
Example for Unix/Linux:
./indexer name_of_taskor
./indexer.exe --config=/home/www/search.conf name_of_task
To perform indexing of several sites at once, one should enter the sites` URLs within one job in search.conf:
Having finished the indexing the system creates the following set of index files:
Note: At the present moment two types of indexing are available in the system:
There is a possibility to optimize the search process by means of the index defragmentation: the indexing results are being systematized, which allows accelerating the next search process. To fulfill defragmentation one should copy idefrag.exe file, located in the indexer directory, to a folder containing index files (index.cns, docs.cns and files.cns) and launch it. After the end of the process docs.cns will be replaced by results.cns.
Note: Defragmented index files can not be edited.
To perform search within the generated index, one should perform the following options:
It is possible to sort out the search results by date or by relevancy.
One can set the interface of the results form with the help of templates (see Templates setting).
'fulltxt.cns' file contains all texts of the indexing documents: these data allow showing text samples, containing highlighted search phrase in the search results, for instance:
Note: 'fulltxt.cns' file may be of a considerable size; in this case one can delete it or cancel its generation by means of Type parameter (see search.conf) during the indexing process - search results will be displayed in the following way (without highlighting and citing, only first 256 symbols of a document):