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

Introduction :: Manual :: Order :: License :: System requirements

Main

RiSearch Pro v.3.2 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 RiSearch 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.

Setting search type

      Different search types mentioned above (substring search, fuzzy search, etc.) can be set in config file by parameter def_search_type. Possible values are:

  • 0 - search by beginning
    This method works only with INDEXING_SCHEME => 2 and may be removed in next versions. Please use more powerfull "substring search" instead.
  • 1 - exact word search
  • 2 - substring search
  • 3 - search all wordforms (Russian version only)
  • 4 - fuzzy search

      Parameter def_search_type defines default search type. You can also change search type through search form, using parameter "dst". For example:

http://www.search.com/cgi-bin/search.pl?q=word&dst;=2

      Search type applies to whole query, however you can apply separate search types for different words. For exapmle, exclamation sign at the end of queryword makes search type for this word to be "exact word search" (example: 'word!'), "#" character at the end of queryword will turn on fuzzy search for this word (example: 'word#'), if queryword contains characters "*" or "?" - substring search will be used (example: 'word*').

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 allows 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