Back to mnoGoSearch site


mnoGoSearch 3.2.43 reference manual: Full-featured search engine software
PrevChapter 3. IndexingNext

Storing cached copies

Since mnoGoSearch version 3.2.2, it is possible to store compressed copies of the indexed documents, so called cached copies. Cached copies are stored in the same SQL database.

If cached copies creation is active, then one can open the cached copy in the browser during search time. The cached copy is especially useful if the site's server is temporarily down or the page does not exist any longer.

Since mnoGoSearch version 3.2.4 cached copies are also used to produce documents excerpts for search results.

Cached copies are displayed by means of the search.cgi CGI script, executed with a special HTTP query string parameters. search.cgi fetches a cached copy of the document from the SQL database, then the document is displayed in your web browser, with search keywords highlighted.

To enable cached copies support, compile mnoGoSearch with zlib support:


     ./configure --with-zlib <other arguments>
   

Configuring cached copies

To start using cached copies, please do the following:

Open /usr/local/mnogosearch/etc/indexer.conf in your favorite text editor and add this line:

Section CachedCopy 0 64000

where 64000 is maximum compressed cached copy size. If after compression a document's cached copy size is bigger than this number, then the cached copy is not stored. You can change this number according to your needs and your SQL database features.

Using cached copies at search time

To enable displaying cached copies during search time, do the following:

After cached copies have been configured, it works in the following order during search time:

  1. For each document a link to its cached copy is displayed;

  2. When the user clicks the link, search.cgi is executed. It sends a query to the SQL database and fetches the cached copy content.

  3. search.cgi decompresses the requested cached copy and sends it to the web browser, highlighting the search keywords using the highlighting method given in HlBeg and HlEnd commands;