ENG/RUS   Main :: RiSearch :: RiSearch Pro :: RiFlex :: RiLax :: Forum

Introduction

      RiLax - clone of script RiSearch, designed for plain text database indexing. It should be able to hanlde files with up to 50000-100000 records.

Download

      This script is distributed on the same conditions, as RiSearch.

rilax-0.1.03 (last changes 08.03.02)

Demo

      This simple ZIP code finder was builded in several minuts using RiLax.


Search mode: "AND" "OR"

Configuration

      Most of the configuration parameters of this script are selfdocumented in configuration file.

  1.  $DB_NAME = 'filename';  - name of database file.

  2.  $record_separator = "\n";  - records delimiter in database (in most cases newline character).

  3.  $field_separator = "::";  - fields delimiter in records.

  4.  @index_fileds = qw(0 1 2 3);  - specify here which filed should be indexed (starting from 0).

  5.  $numbers = '0-9';  - during the indexing script removes all non alphabetic characters from page and index what is left. As alphabetic character script interpret Latin characters and characters of regional alphabet. Here you may add other characters, which should be indexed (such as numbers, underscore sign and so on).

  6.  $INDEXING_SCHEME = 2;  - words indexing scheme. If indexing scheme equal "1", index is build on the whole word base. Most fastest method, but script will find only words equal to the keyword.

    When indexing scheme is "2", index is based on the beginning of each word. Script will find all words, which begin with given keyword. For example, for query "port" the words "portrait" and "portion" also will be found.

    If indexing scheme equal "3" script put in index every substring with length 4. It allows to find documents even in case when only middle part of word is entered as keyword. In above case, for example, next words will be found: "important", "sport", "report" and so on.

Template usage

      Script uses template to control design of its output. Template is placed in file "template.htm". It is standard HTML file, which can be opened by every browser. You may look how your page will be displayed and edit it.

      Template consists of seven section: "header" and "footer" will be displayed in every case; "results_header", "results" and "results_footer" are displayed in case of succsessful search; "no_results" is used if no results are found; "empty_query" will be displayed if there are no query supplied.

      Each section divided by marks, like this:

 <!-- RiSearch::header::start --> 
You may edit everything between two dividers.

      Template uses several predefined parameters, which will be replaced by results of script work. Here is full list of parameters:

  1.  %query%  - query.

  2.  %search_time%  - time used by script to perform search.

  3.  %query_statistics%  - found words statistics (string like - "word1-n1 word2-n2").

  4.  %stpos%  - the starting number for results on this page.

  5.  %dataN%  - prints value of Nth field.

  6.  %rescount%  - total number of found files.

  7.  %next_results%  - links to next pages with results.

  8.  %rand_number%  - random number in range from 0 to 255, which may be used in code for banner exchange systems (the number is fixed in one section, but new number is generated for each section).

History

Ver. 0.1.03 - 08.03.2002
Fixed serious bug in index.pl.
Ver. 0.1.02 - 23.02.2002
You may specify which fields should be indexed.
Ver. 0.1.01 - 04.01.2002
Ver. 0.1 - 16.12.2001


http://risearch.org S.Tarasov, © 2000-2001