|
|
| ENG/RUS Main :: RiSearch :: RiSearch Pro :: RiCoord :: RiMap :: RiSearch PHP :: RiLax :: Forum |
|
|
|
|
| Introduction :: Manual :: Order :: License |
|
|
Main
RiLax Manual© С. ТарасовAdvanced search configurationTo use advanced search capabilities you have to configure script. Please define types of each field (attribute). Please note, that advanced search will work only with single database or with multiple databases with similar formats (so that fields will be the same).
For each field you have to choose required options and put in config
sum in such format:
For example, you have database with US ZIP codes in next format:
Such configuration parameters can be used in this case:
Query language
By default script will search in all indexed fields.
search.pl?q=DALLAS&a=9 search.pl?q8=TEXAS&q9=DALLAS - all ZIP codes in state TEXAS in county DALLAS (if parameter "q=word" is added, this word will be searched in all indexed fields). There is one specific query "*", like "search.pl?q8=*&q9=DALLAS". In this case script will search word "DALLAS" in field 9, not depending on value of field 8 ("q8=*" will be simply ignored).
For example, all ZIP codes in range 0-1000: search.pl?a0gt=0&a0le=1000 If several comparison operations are used in one query, they will be processed using "AND" logic ("a1lt=10&a2gt=10" means field 1 should be less then 10 and field 2 greater then 10). You can add parameter "ctype=OR" to change logic to "OR" ("a1lt=10&a2gt=10&ctype=OR"). For date fields comparison operations should be used in next form: search.pl?q0=smith&a2gt=01.01.2000 Results sortingResults can be sorted according to some field. For this parameter "s" should be used (for example "search.pl?q0=smith&a2gt=01.01.2000&s=2"). Please note that sorting by text field can take quite long time if many matches were found. You can sort results by several fields simultaneously (works only with text fields). For example: "q=word&s=2_3" - results will be sorted by field 2 and by field 3, if values of field 2 are equal. Results outputUse such string in template - %data_N% (where N is attribute number) to print value of filed N. |
| http://risearch.org | S.Tarasov, © 2000-2003 |