ENG/RUS   Main :: RiSearch :: RiSearch Pro :: RiCoord :: RiMap :: RiSearch PHP :: RiLax :: Forum

Introduction :: Manual :: Order :: License

Main

RiLax Manual

© S. Tarasov

Query language

      Keywords should be written with commas or spaces between them. The case is not important.
      The search type "AND" means that RiLax will find files which contain ALL keywords. The search type "OR" means that script will find all files which contain at least one keyword. In any search regime mark "+" before keyword means that this keyword should be in returned pages. In order to exclude word from results type "-" before keyword, for example "+perl -CGI".
      By default script will return any files where it finds the keywords. If index was created with INDEXING_SCHEME => 2 option, you can add "*" to the query. In this case beginning of the word will be found. For example, if you ask "port*", RiSearch will find all pages with words "port", "portrait", "portfolio", "portion" and so on.

      Keywords in quotes are considered as phrase and will be found only when these keywords appear together in document (works only with  word_dist => 1, ).

Substring search

      In order to use substring search, you have to create auxiliary substring index first (see part "Indexing" of this manual). After index is created you can use meta-characters in your queries: "?" and "*". Meta-character "?" can be used in query in place of any other symbol, and "*" means any number (including zero) of any characters. For example: "sub?t*g" will find word "substring".

Fuzzy search

      Fuzzy search (search with errors) can be used only when substring index (see part "Indexing" of this manual) is created. Add "#" character at the end of word and script will find all similar words. Only two errors are allowed by default (can be changed in configuration file). Fuzzy search works only when at least one 3-letters long substring in entered word is correct.

Misspelled keyword correction

      In case keyword was not found in database script tries to find similar words (only one error is allowed in this case) in index and suggests to user to perform another search with corrected query. If there are several words similar to misspelled keyword, only first found word will be suggested to user. This function also requires substring index to be created during indexing.

Boolean search

      RiSearch Pro support boolean queries (operators AND, OR, NOT and brackets). This feature will be activated automatically when query have listed above operators (in upper case).

Operator AND requires both words to be present in found documents ("dog AND cat").

Operator OR will find documents with any of the two words ("dog OR cat").

Operator NOT before word exclude documents with this word from result ("dog NOT cat").

      Brackets allow to build complex queries.

(dog AND cat) OR (fish AND bird) - will be found documents with words "dog" and "cat", or words "fish" and "bird". Documents with three or all four words will be found too.

(dog AND cat) NOT (fish OR bird) - in returned dociments should be both words "dog" and "cat", but no "fish" or "bird" are allowed.

(dog AND cat) NOT (fish AND bird) - in returned dociments should be both words "dog" and "cat" and no words "fish" and "bird" together.

( (dog AND cat) NOT (fish OR bird) ) OR ( (fish AND bird) NOT (dog OR cat) ) - will be returned documents with words "dog" and "cat", or words "fish" and "bird". In contrary to the first example, all combinations from three or four words are forbiden.



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