RiLax - clone of script RiSearch, designed for plain text database indexing.
It should be able to hanlde files with up to 50000-100000 records.
This script is distributed on the same conditions, as RiSearch.
rilax-0.1.03 (last changes 08.03.02)
This simple ZIP code finder was builded in several minuts using RiLax.
Most of the configuration parameters of this script
are selfdocumented in configuration file.
$DB_NAME = 'filename';
- name of database file.
$record_separator = "\n";
- records delimiter in database (in most cases newline character).
$field_separator = "::";
- fields delimiter in records.
@index_fileds = qw(0 1 2 3);
- specify here which filed should be indexed (starting from 0).
$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).
$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.
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
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:
- time used by script to perform search.
- found words statistics (string like - "word1-n1 word2-n2").
- the starting number for results on this page.
- prints value of Nth field.
- total number of found files.
- links to next pages with results.
- 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).
- 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