gluke           Thu Feb 15 04:09:59 2001 EDT

  Modified files:              
    /phpdoc/en/functions        mnogosearch.xml 
  Log:
  Removed \r EOL chars.
  
  
Index: phpdoc/en/functions/mnogosearch.xml
diff -u phpdoc/en/functions/mnogosearch.xml:1.4 phpdoc/en/functions/mnogosearch.xml:1.5
--- phpdoc/en/functions/mnogosearch.xml:1.4     Thu Feb 15 04:01:56 2001
+++ phpdoc/en/functions/mnogosearch.xml Thu Feb 15 04:09:58 2001
@@ -1,601 +1,602 @@
- <reference id="ref.mnogo">
-  <title>mnoGoSearch Functions</title>
-  <titleabbrev>mnoGoSearch</titleabbrev>
-  <partintro>
-   <simpara>
-    These functions allow you to access mnoGoSearch (former
-    UdmSearch) free search engine.  In order to have these
-    functions available, you must compile php with mnogosearch
-    support by using the <option role="configure">--with-mnogosearch</option> 
-    option. If you use this option without specifying the
-    path to mnogosearch, php will look for mnogosearch under
-    /usr/local/mnogosearch path by default. If you installed
-    mnogosearch at other path you should specify it: 
-    <option role="configure">--with-mnogosearch=DIR</option>.
-   </simpara>
-   <note>
-    <para>
-     php contains built-in mysql access library, which can be used to
-     access mysql. It is known that mnoGoSearch is not compatible with
-     this built-in library and can work only with generic mysql
-     libraries. Thus, if you use mnoGoSearch with mysql, during php
-     configuration you have to indicate directory of mysql
-     installation, that was used during mnoGoSearch configuration, i.e. for example: 
-     <option role="configure">--with-mnogosearch --with-mysql=/usr</option>
-    </para>
-   </note>
-   <simpara>
-    You need at least 3.1.10 version of mnoGoSearch installed to use
-    these functions.
-   </simpara>
-   <simpara>
-    More information about mnoGoSearch can be found at <ulink 
url="&url.mnogo;">&url.mnogo;</ulink>.
-   </simpara>
-  </partintro>
-
-  <refentry id="function.udm-alloc-agent">
-   <refnamediv>
-    <refname>udm_alloc_agent</refname>
-    <refpurpose>Allocate mnoGoSearch session</refpurpose>
-   </refnamediv>
-   <refsect1>
-    <title>Description</title>
-    <funcsynopsis>
-     <funcprototype>
-      <funcdef>int <function>udm_alloc_agent</function></funcdef>
-      <paramdef>string <parameter>dbaddr</parameter></paramdef>
-      <paramdef>string
-       <parameter>
-        <optional>dbmode</optional>
-       </parameter>
-      </paramdef>
-     </funcprototype>
-    </funcsynopsis>
-    <para>
-     <function>udm_alloc_agent</function> returns mnogosearch agent
-     identifier on success, <literal>FALSE</literal> on error. This function creates a
-     session with database parameters.
-    </para>
-    <para>
-     <parameter>dbaddr</parameter> - URL-style database description. Options (type, 
host, database name, port, user and password) to connect to SQL database.
-     Do not matter for built-in text files support. Format: DBAddr 
DBType:[//[DBUser[:DBPass]@]DBHost[:DBPort]]/DBName/
-     Currently supported DBType values are: mysql, pgsql, msql, solid, mssql, oracle, 
ibase. Actually, it does not matter for native libraries support.
-     But ODBC users should specify one of supported values. If your database type is 
not supported, you may use "unknown" instead.
-    </para>
-    <para>
-     <parameter>dbmode</parameter> - You may select SQL database mode of words 
storage. When "single" is specified, all words are stored in the same
-     table. If "multi" is selected, words will be located in different tables 
depending of their lengths. "multi" mode is usually faster
-     but requires more tables in database. If "crc" mode is selected, mnoGoSearch 
will store 32 bit integer
-     word IDs calculated by CRC32 algorythm instead of words. This mode requres less 
disk space and it is faster comparing with "single"
-     and "multi" modes. "crc-multi" uses the same storage structure with the "crc" 
mode, but also stores words in different tables depending on 
-     words lengths like "multi" mode. Format: DBMode single/multi/crc/crc-multi
-    </para>
-    <note>
-     <para>
-     <parameter>dbaddr</parameter> and <parameter>dbmode</parameter> must match those 
used during indexing.
-     </para>
-    </note>
-    <note>
-     <para>
-      In fact this function does not open connection to database and
-      thus does not check entered login and password. Actual connection to database 
and login/password verification is done by <function>udm_find</function>.
-     </para>
-    </note>
-   </refsect1>
-  </refentry>
-
-  <refentry id="function.udm-set-agent-param">
-   <refnamediv>
-    <refname>udm_set_agent_param</refname>
-    <refpurpose>Set mnoGoSearch agent session parameters</refpurpose>
-   </refnamediv>
-   <refsect1>
-    <title>Description</title>
-    <funcsynopsis>
-     <funcprototype>
-      <funcdef>int <function>udm_set_agent_param</function></funcdef>
-      <paramdef>int <parameter>agent</parameter></paramdef>
-      <paramdef>int <parameter>var</parameter></paramdef>
-      <paramdef>string <parameter>val</parameter></paramdef>
-     </funcprototype>
-    </funcsynopsis>
-    <para>
-     <function>udm_set_agent_param</function> returns <literal>TRUE</literal> on 
success,
-     <literal>FALSE</literal> on error.  Defines mnoGoSearch session parameters.
-    </para>
-    <simpara>
-     The following parameters and their values are available:
-    </simpara>
-    <itemizedlist>
-     <listitem>
-       <simpara>
-       UDM_PARAM_PAGE_NUM - used to choose search results page number (results are 
returned by pages beginning from
-    0, with UDM_PARAM_PAGE_SIZE results per page).
-       </simpara>
-     </listitem> 
-     <listitem>
-       <simpara>
-       UDM_PARAM_PAGE_SIZE - number of search results displayed on one page.
-       </simpara>
-     </listitem> 
-     <listitem>
-       <simpara>
-       UDM_PARAM_SEARCH_MODE - search mode. The following values available: 
UDM_MODE_ALL -
-    search for all words; UDM_MODE_ANY - search for any word; UDM_MODE_BOOL - boolean 
search. See <function>udm_find</function> for details on boolean search.
-       </simpara>
-      </listitem> 
-      <listitem>
-       <simpara>
-       UDM_PARAM_CACHE_MODE - turns on or off search result cache mode. When enabled, 
the search engine will store 
-       search results to disk. In case a similar search is performed later, the 
engine will take results from the cache for faster performance.
-       Available values: UDM_CACHE_ENABLED, UDM_CACHE_DISABLED.
-       </simpara>
-      </listitem> 
-      <listitem>
-       <simpara>
-       UDM_PARAM_TRACK_MODE - turns on or off trackquery mode. Since version 3.1.2 
mnoGoSearch has a query tracking support.
-       Note that tracking is implemented in SQL version only and not available in 
built-in database. 
-       To use tracking, you have to create tables for tracking support. For MySQL, 
use create/mysql/track.txt. 
-       When doing a search, front-end uses those tables to store query words, a 
number of found documents and current UNIX timestamp in seconds.
-       Available values: UDM_TRACK_ENABLED, UDM_TRACK_DISABLED.
-       </simpara>
-      </listitem> 
-      <listitem>
-       <simpara>
-       UDM_PARAM_CHARSET - defines local charset. Available values: set of charsets 
supported by mnoGoSearch,
-    e.g. koi8-r, cp1251, ...
-       </simpara>
-      </listitem> 
-      <listitem>
-       <simpara>
-       UDM_PARAM_STOPFILE - Defines name and path
-     to stopwords file.  (There is a small difference with mnoGoSearch
-     - while in mnoGoSearch if relative path or no path entered, it
-     looks for this file in relation to UDM_CONF_DIR, the module looks for
-     the file in relation to current path, i.e. to the path where the
-     php script is executed.)
-          </simpara>
-         </listitem>
-         <listitem>
-       <simpara>
-       UDM_PARAM_STOPTABLE - Load stop words from the given SQL table. You may use 
several StopwordTable commands. 
-     This command has no effect when compiled without SQL database support.
-          </simpara>
-         </listitem> 
-     </itemizedlist>
-    </refsect1>
-  </refentry>
-
-  <refentry id="function.udm-add-search-limit">
-   <refnamediv>
-    <refname>udm_add_search_limit</refname>
-    <refpurpose>Add various search limits</refpurpose>
-   </refnamediv>
-   <refsect1>
-    <title>Description</title>
-    <funcsynopsis>
-     <funcprototype>
-      <funcdef>int <function>udm_add_search_limit</function></funcdef>
-      <paramdef>int <parameter>agent</parameter></paramdef>
-      <paramdef>int <parameter>var</parameter></paramdef>
-      <paramdef>string <parameter>val</parameter></paramdef>
-     </funcprototype>
-    </funcsynopsis>
-    <para>
-     <function>udm_add_search_limit</function> returns <literal>TRUE</literal> on
-     success, <literal>FALSE</literal> on error. Adds search restrictions.
-    </para>
-    <para>
-     <parameter>agent</parameter> - a link to Agent,
-     received after call to <function>udm_alloc_agent</function>.
-     </para>
-     <para>
-     <parameter>var</parameter> - defines parameter, indicating limit.
-     </para>
-     <para>
-     <parameter>val</parameter> - defines value of the current parameter.
-     </para>
-     <para>
-     Possible <parameter>var</parameter> values:
-     </para>
-     <itemizedlist>
-      <listitem>
-      <simpara>
-      UDM_LIMIT_URL - defines document URL limitations to limit search through 
subsection
-         of database. It supports SQL % and _  LIKE wildcards, where % matches any 
number of characters, even zero characters,
-         and _ matches exactly one character. E.g. http://my.domain.__/catalog may 
stand for http://my.domain.ru/catalog and http://my.domain.ua/catalog.
-      </simpara>
-     </listitem> 
-     <listitem>
-      <simpara>
-     UDM_LIMIT_TAG - defines site TAG limitations. In indexer-conf you can assign 
specific TAGs to various sites and parts of a site. 
-     Tags in mnoGoSearch 3.1.x are lines, that may contain metasymbols % and _. 
Metasymbols allow searching among groups of tags.
-     E.g. there are links with tags ABCD and ABCE, and search restriction is by ABC_ 
- the search will be made among both of the tags.
-      </simpara>
-     </listitem>
-     <listitem>
-      <simpara>
-      UDM_LIMIT_LANG - defines document language limitations.
-      </simpara>
-     </listitem>
-     <listitem>
-      <simpara>
-      UDM_LIMIT_CAT - defines document category limitations. Categories are similar 
to tag feature, but nested. So you can have
-      one category inside another and so on. You have to use two characters
-         for each level. Use a hex number going from 0-F or a 36 base number going 
from 0-Z.   
-         Therefore a top-level category like 'Auto' would be 01. If it has a
-         subcategory like 'Ford', then it would be 01 (the parent category) and then
-         'Ford' which we will give 01. Put those together and you get 0101. If 'Auto'
-         had another subcategory named 'VW', then it's id would be 01 because it
-         belongs to the 'Ford' category and then 02 because it's the next category.
-         So it's id would be 0102. If VW had a sub category called 'Engine' then it's
-         id would start at 01 again and it would get the 'VW' id 02 and 'Auto' id of
-         01, making it 010201. If you want to search for sites under that category 
then you pass it
-         cat=010201 in the url.
-      </simpara>
-     </listitem>
-    </itemizedlist>
-   </refsect1>
-  </refentry>
-  
-<refentry id="function.udm-clear-search-limits">
-   <refnamediv>
-    <refname>udm_clear_search_limits</refname>
-    <refpurpose>Clear all mnoGoSearch search restrictions</refpurpose>
-   </refnamediv>
-   <refsect1>
-    <title>Description</title>
-    <funcsynopsis>
-     <funcprototype>
-      <funcdef>int <function>udm_clear_search_limits</function></funcdef>
-      <paramdef>int <parameter>agent</parameter></paramdef>
-     </funcprototype>
-    </funcsynopsis>
-    <para>
-     <function>udm_clear_search_limits</function> resets defined search limitations 
and returns <literal>TRUE</literal>.
-    </para>
-   </refsect1>
-  </refentry>
-
-  <refentry id="function.udm-find">
-   <refnamediv>
-    <refname>udm_find</refname>
-    <refpurpose>Perform search</refpurpose>
-   </refnamediv>
-   <refsect1>
-    <title>Description</title>
-    <funcsynopsis>
-     <funcprototype>
-      <funcdef>int <function>udm_find</function></funcdef>
-      <paramdef>int <parameter>agent</parameter></paramdef>
-      <paramdef>string <parameter>query</parameter></paramdef>
-     </funcprototype>
-    </funcsynopsis>
-    <para>
-     <function>udm_find</function> returns result link identifier on success,
-      <literal>FALSE</literal> on error.
-    </para>
-    <para>
-     The search itself. The first argument - session, the next one -
-     query itself.  To find something just type words you want to find
-     and press SUBMIT button.  For example, "mysql odbc". You should
-     not use quotes " in query, they are written here only to divide a
-     query from other text. mnoGoSearch will find all documents that
-     contain word "mysql" and/or word "odbc".  Best documents having
-     bigger weights will be displayed first.  If you use search mode
-     ALL, search will return documents that contain both (or more)
-     words you entered. In case you use mode ANY, the search will
-     return list of documents that contain any of the words you
-     entered.  If you want more advanced results you may use query
-     language.  You should select "bool" match mode in the search
-     from.
-    </para>
-    <simpara>
-     mnoGoSearch understands the following boolean operators:
-    </simpara>
-    <simpara>
-     &amp; - logical AND. For example, &quot;mysql &amp;
-     odbc&quot;. mnoGoSearch will find any URLs that contain both
-     &quot;mysql&quot; and &quot;odbc&quot;.
-    </simpara>
-    <simpara>
-     | - logical OR. For example &quot;mysql|odbc&quot;. mnoGoSearch
-     will find any URLs, that contain word &quot;mysql&quot; or word
-     &quot;odbc&quot;.
-    </simpara>
-    <simpara>
-     ~ - logical NOT. For example &quot;mysql &amp; ~odbc&quot;.
-     mnoGoSearch will find URLs that contain word &quot;mysql&quot;
-     and do not contain word &quot;odbc&quot; at the same time. Note
-     that ~ just excludes given word from results.  Query
-     &quot;~odbc&quot; will find nothing!
-    </simpara>
-    <simpara>
-     () - group command to compose more complex queries.  For example
-     &quot;(mysql | msql) &amp; ~postgres&quot;.  Query language is
-     simple and powerful at the same time. Just consider query as
-     usual boolean expression.
-    </simpara>
-   </refsect1>
-  </refentry>
-
-  <refentry id="function.udm-get-res-param">
-   <refnamediv>
-    <refname>udm_get_res_param</refname>
-    <refpurpose>Get mnoGoSearch result parameters</refpurpose>
-   </refnamediv>
-   <refsect1>
-    <title>Description</title>
-    <funcsynopsis>
-     <funcprototype>
-      <funcdef>string <function>udm_get_res_param</function></funcdef>
-      <paramdef>int <parameter>res</parameter></paramdef>
-      <paramdef>int <parameter>param</parameter></paramdef>
-     </funcprototype>
-    </funcsynopsis>
-    <para>
-     <function>udm_get_res_param</function> returns result parameter
-     value on success, <literal>FALSE</literal> on error.
-    </para>
-    <para>
-     <parameter>res</parameter> - a link to result identifier,
-     received after call to <function>udm_find</function>.
-    </para>
-    <para>
-     <parameter>param</parameter> - parameter identifier, may have the
-     following values:
-    </para>
-    <itemizedlist>
-      <listitem>
-      <simpara>
-       UDM_PARAM_NUM_ROWS - number of received found links on the current page.  It 
is equal to
-       UDM_PARAM_PAGE_SIZE for all search pages, on the last page - the rest of links.
-      </simpara>
-     </listitem> 
-     <listitem>
-      <simpara>
-       UDM_PARAM_FOUND - total number of results matching the query.
-      </simpara>
-     </listitem>
-     <listitem>
-      <simpara>
-       UDM_PARAM_WORDINFO - information on the words found. E.g. search for "a good 
book" will return "a: stopword, good:5637, book: 120"
-      </simpara>
-     </listitem>
-     <listitem>
-      <simpara>
-       UDM_PARAM_SEARCHTIME - search time in seconds.
-      </simpara>
-     </listitem>
-     <listitem>
-      <simpara>
-       UDM_PARAM_FIRST_DOC - the number of the first document displayed on current 
page.
-      </simpara>
-     </listitem>
-     <listitem>
-      <simpara>
-       UDM_PARAM_LAST_DOC - the number of the last document displayed on current page.
-      </simpara>
-     </listitem>
-    </itemizedlist>
-   </refsect1>
-  </refentry>
-
-  <refentry id="function.udm-get-res-field">
-   <refnamediv>
-    <refname>udm_get_res_field</refname>
-    <refpurpose>Fetch mnoGoSearch result field</refpurpose>
-   </refnamediv>
-   <refsect1>
-    <title>Description</title>
-    <funcsynopsis>
-     <funcprototype>
-      <funcdef>string <function>udm_get_res_field</function></funcdef>
-      <paramdef>int <parameter>res</parameter></paramdef>
-      <paramdef>int <parameter>row</parameter></paramdef>
-         <paramdef>int <parameter>field</parameter></paramdef>
-     </funcprototype>
-    </funcsynopsis>
-    <para>
-     <function>udm_get_res_field</function> returns result field value on success, 
<literal>FALSE</literal> on error.
-    </para>
-    <para>
-     <parameter>res</parameter> - a link to result identifier,
-     received after call to <function>udm_find</function>.
-    </para>
-    <para>
-     <parameter>row</parameter> - the number of the link on the current page. May 
have values from 0 to 
-     <parameter>UDM_PARAM_NUM_ROWS</parameter>.
-    </para>
-    <para>
-     <parameter>field</parameter> - field identifier, may have the following values:
-    </para>
-    <itemizedlist>
-     <listitem>
-      <simpara>
-       UDM_FIELD_URL - document URL field
-      </simpara>
-     </listitem> 
-     <listitem>
-      <simpara>
-       UDM_FIELD_CONTENT - document Content-type field (for example, text/html).
-      </simpara>
-     </listitem>
-     <listitem>
-      <simpara>
-       UDM_FIELD_TITLE - document title field.
-      </simpara>
-     </listitem>
-     <listitem>
-      <simpara>
-       UDM_FIELD_KEYWORDS - document keywords field (from META KEYWORDS tag).
-      </simpara>
-     </listitem>
-     <listitem>
-      <simpara>
-       UDM_FIELD_DESC - document description field (from META DESCRIPTION tag).
-      </simpara>
-     </listitem>
-     <listitem>
-      <simpara>
-       UDM_FIELD_TEXT - document body text (the first couple of lines to give an idea
-        of what the document is about).
-      </simpara>
-     </listitem>
-     <listitem>
-      <simpara>
-       UDM_FIELD_SIZE - document size.
-      </simpara>
-     </listitem>
-     <listitem>
-      <simpara>
-       UDM_FIELD_URLID - unique URL ID of the link.
-      </simpara>
-     </listitem>
-     <listitem>
-      <simpara>
-       UDM_FIELD_RATING  - page rating (as calculated by mnoGoSearch).
-      </simpara>
-     </listitem>
-     <listitem>
-      <simpara>
-       UDM_FIELD_MODIFIED - last-modified field in unixtime format.
-      </simpara>
-     </listitem>
-     <listitem>
-      <simpara>
-       UDM_FIELD_ORDER - the number of the current document in set of found documents.
-      </simpara>
-     </listitem>
-     <listitem>
-      <simpara>
-       UDM_FIELD_CRC - document CRC.
-      </simpara>
-     </listitem>
-    </itemizedlist>
-   </refsect1>
-  </refentry>
-
-  <refentry id="function.udm-free-res">
-   <refnamediv>
-    <refname>udm_free_res</refname>
-    <refpurpose>Free mnoGoSearch result</refpurpose>
-   </refnamediv>
-   <refsect1>
-    <title>Description</title>
-    <funcsynopsis>
-     <funcprototype>
-      <funcdef>int <function>udm_free_res</function></funcdef>
-      <paramdef>int <parameter>res</parameter></paramdef>
-     </funcprototype>
-    </funcsynopsis>
-    <para>
-     <function>udm_free_res</function> returns <literal>TRUE</literal> on success, 
<literal>FALSE</literal> on error.
-    </para>
-    <para>
-     <parameter>res</parameter> - a link to result identifier,
-     received after call to <function>udm_find</function>.
-    </para>
-    <para>
-     Freeing up memory allocated for results.
-    </para>
-   </refsect1>
-  </refentry>
-
-  <refentry id="function.udm-free-agent">
-   <refnamediv>
-    <refname>udm_free_agent</refname>
-    <refpurpose>Free mnoGoSearch session</refpurpose>
-   </refnamediv>
-   <refsect1>
-    <title>Description</title>
-    <funcsynopsis>
-     <funcprototype>
-      <funcdef>int <function>udm_free_agent</function></funcdef>
-      <paramdef>int <parameter>agent</parameter></paramdef>
-     </funcprototype>
-    </funcsynopsis>
-    <para>
-     <function>udm_free_agent</function> returns <literal>TRUE</literal> on success, 
<literal>FALSE</literal> on error.
-    </para>
-    <para>
-     <parameter>agent</parameter> - link to agent identifier, received
-     after call to <function>udm_alloc_agent</function>.
-    </para>
-    <para>
-     Freeing up memory allocated for agent session.
-    </para>
-   </refsect1>
-  </refentry>
-
-  <refentry id="function.udm-errno">
-   <refnamediv>
-    <refname>udm_errno</refname>
-    <refpurpose>Get mnoGoSearch error number</refpurpose>
-   </refnamediv>
-   <refsect1>
-    <title>Description</title>
-    <funcsynopsis>
-     <funcprototype>
-      <funcdef>int <function>udm_errno</function></funcdef>
-      <paramdef>int <parameter>agent</parameter></paramdef>
-     </funcprototype>
-    </funcsynopsis>
-    <para>
-     <function>udm_errno</function> returns mnoGoSearch error number,
-     zero if no error.
-    </para>
-    <para>
-     <parameter>agent</parameter> - link to agent identifier, received
-     after call to <function>udm_alloc_agent</function>.
-    </para>
-    <para>
-     Receiving numeric agent error code.
-    </para>
-   </refsect1>
-  </refentry>
-
-  <refentry id="function.udm-error">
-   <refnamediv>
-    <refname>udm_error</refname>
-    <refpurpose>Get mnoGoSearch error message</refpurpose>
-   </refnamediv>
-   <refsect1>
-    <title>Description</title>
-    <funcsynopsis>
-     <funcprototype>
-      <funcdef>string <function>udm_error</function></funcdef>
-      <paramdef>int <parameter>agent</parameter></paramdef>
-     </funcprototype>
-    </funcsynopsis>
-    <para>
-     <function>udm_error</function> returns mnoGoSearch error message,
-     empty string if no error.
-    </para>
-    <para>
-     <parameter>agent</parameter> - link to agent identifier, received
-     after call to <function>udm_alloc_agent</function>.
-    </para>
-    <para>
-     Receiving agent error message.
-    </para>
-   </refsect1>
-  </refentry>
- </reference>
-
-<!-- Keep this comment at the end of the file
-Local variables:
-mode: sgml
-sgml-omittag:t
-sgml-shorttag:t
-sgml-minimize-attributes:nil
-sgml-always-quote-attributes:t
-sgml-indent-step:1
-sgml-indent-data:t
-sgml-parent-document:nil
-sgml-default-dtd-file:"../../manual.ced"
-sgml-exposed-tags:nil
-sgml-local-catalogs:nil
-sgml-local-ecat-files:nil
-End:
--->
+ <reference id="ref.mnogo">
+  <title>mnoGoSearch Functions</title>
+  <titleabbrev>mnoGoSearch</titleabbrev>
+  <partintro>
+   <simpara>
+    These functions allow you to access mnoGoSearch (former
+    UdmSearch) free search engine.  In order to have these
+    functions available, you must compile php with mnogosearch
+    support by using the <option role="configure">--with-mnogosearch</option> 
+    option. If you use this option without specifying the
+    path to mnogosearch, php will look for mnogosearch under
+    /usr/local/mnogosearch path by default. If you installed
+    mnogosearch at other path you should specify it: 
+    <option role="configure">--with-mnogosearch=DIR</option>.
+   </simpara>
+   <note>
+    <para>
+     php contains built-in mysql access library, which can be used to
+     access mysql. It is known that mnoGoSearch is not compatible with
+     this built-in library and can work only with generic mysql
+     libraries. Thus, if you use mnoGoSearch with mysql, during php
+     configuration you have to indicate directory of mysql
+     installation, that was used during mnoGoSearch configuration, i.e. for example: 
+     <option role="configure">--with-mnogosearch --with-mysql=/usr</option>
+    </para>
+   </note>
+   <simpara>
+    You need at least 3.1.10 version of mnoGoSearch installed to use
+    these functions.
+   </simpara>
+   <simpara>
+    More information about mnoGoSearch can be found at <ulink 
+url="&url.mnogo;">&url.mnogo;</ulink>.
+   </simpara>
+  </partintro>
+
+  <refentry id="function.udm-alloc-agent">
+   <refnamediv>
+    <refname>udm_alloc_agent</refname>
+    <refpurpose>Allocate mnoGoSearch session</refpurpose>
+   </refnamediv>
+   <refsect1>
+    <title>Description</title>
+    <funcsynopsis>
+     <funcprototype>
+      <funcdef>int <function>udm_alloc_agent</function></funcdef>
+      <paramdef>string <parameter>dbaddr</parameter></paramdef>
+      <paramdef>string
+       <parameter>
+        <optional>dbmode</optional>
+       </parameter>
+      </paramdef>
+     </funcprototype>
+    </funcsynopsis>
+    <para>
+     <function>udm_alloc_agent</function> returns mnogosearch agent
+     identifier on success, <literal>FALSE</literal> on error. This function creates a
+     session with database parameters.
+    </para>
+    <para>
+     <parameter>dbaddr</parameter> - URL-style database description. Options (type, 
+host, database name, port, user and password) to connect to SQL database.
+     Do not matter for built-in text files support. Format: DBAddr 
+DBType:[//[DBUser[:DBPass]@]DBHost[:DBPort]]/DBName/
+     Currently supported DBType values are: mysql, pgsql, msql, solid, mssql, oracle, 
+ibase. Actually, it does not matter for native libraries support.
+     But ODBC users should specify one of supported values. If your database type is 
+not supported, you may use "unknown" instead.
+    </para>
+    <para>
+     <parameter>dbmode</parameter> - You may select SQL database mode of words 
+storage. When "single" is specified, all words are stored in the same
+     table. If "multi" is selected, words will be located in different tables 
+depending of their lengths. "multi" mode is usually faster
+     but requires more tables in database. If "crc" mode is selected, mnoGoSearch 
+will store 32 bit integer
+     word IDs calculated by CRC32 algorythm instead of words. This mode requres less 
+disk space and it is faster comparing with "single"
+     and "multi" modes. "crc-multi" uses the same storage structure with the "crc" 
+mode, but also stores words in different tables depending on 
+     words lengths like "multi" mode. Format: DBMode single/multi/crc/crc-multi
+    </para>
+    <note>
+     <para>
+     <parameter>dbaddr</parameter> and <parameter>dbmode</parameter> must match those 
+used during indexing.
+     </para>
+    </note>
+    <note>
+     <para>
+      In fact this function does not open connection to database and
+      thus does not check entered login and password. Actual connection to database 
+and login/password verification is done by <function>udm_find</function>.
+     </para>
+    </note>
+   </refsect1>
+  </refentry>
+
+  <refentry id="function.udm-set-agent-param">
+   <refnamediv>
+    <refname>udm_set_agent_param</refname>
+    <refpurpose>Set mnoGoSearch agent session parameters</refpurpose>
+   </refnamediv>
+   <refsect1>
+    <title>Description</title>
+    <funcsynopsis>
+     <funcprototype>
+      <funcdef>int <function>udm_set_agent_param</function></funcdef>
+      <paramdef>int <parameter>agent</parameter></paramdef>
+      <paramdef>int <parameter>var</parameter></paramdef>
+      <paramdef>string <parameter>val</parameter></paramdef>
+     </funcprototype>
+    </funcsynopsis>
+    <para>
+     <function>udm_set_agent_param</function> returns <literal>TRUE</literal> on 
+success,
+     <literal>FALSE</literal> on error.  Defines mnoGoSearch session parameters.
+    </para>
+    <simpara>
+     The following parameters and their values are available:
+    </simpara>
+    <itemizedlist>
+     <listitem>
+       <simpara>
+       UDM_PARAM_PAGE_NUM - used to choose search results page number (results are 
+returned by pages beginning from
+    0, with UDM_PARAM_PAGE_SIZE results per page).
+       </simpara>
+     </listitem> 
+     <listitem>
+       <simpara>
+       UDM_PARAM_PAGE_SIZE - number of search results displayed on one page.
+       </simpara>
+     </listitem> 
+     <listitem>
+       <simpara>
+       UDM_PARAM_SEARCH_MODE - search mode. The following values available: 
+UDM_MODE_ALL -
+    search for all words; UDM_MODE_ANY - search for any word; UDM_MODE_BOOL - boolean 
+search. See <function>udm_find</function> for details on boolean search.
+       </simpara>
+      </listitem> 
+      <listitem>
+       <simpara>
+       UDM_PARAM_CACHE_MODE - turns on or off search result cache mode. When enabled, 
+the search engine will store 
+       search results to disk. In case a similar search is performed later, the 
+engine will take results from the cache for faster performance.
+       Available values: UDM_CACHE_ENABLED, UDM_CACHE_DISABLED.
+       </simpara>
+      </listitem> 
+      <listitem>
+       <simpara>
+       UDM_PARAM_TRACK_MODE - turns on or off trackquery mode. Since version 3.1.2 
+mnoGoSearch has a query tracking support.
+       Note that tracking is implemented in SQL version only and not available in 
+built-in database. 
+       To use tracking, you have to create tables for tracking support. For MySQL, 
+use create/mysql/track.txt. 
+       When doing a search, front-end uses those tables to store query words, a 
+number of found documents and current UNIX timestamp in seconds.
+       Available values: UDM_TRACK_ENABLED, UDM_TRACK_DISABLED.
+       </simpara>
+      </listitem> 
+      <listitem>
+       <simpara>
+       UDM_PARAM_CHARSET - defines local charset. Available values: set of charsets 
+supported by mnoGoSearch,
+    e.g. koi8-r, cp1251, ...
+       </simpara>
+      </listitem> 
+      <listitem>
+       <simpara>
+       UDM_PARAM_STOPFILE - Defines name and path
+     to stopwords file.  (There is a small difference with mnoGoSearch
+     - while in mnoGoSearch if relative path or no path entered, it
+     looks for this file in relation to UDM_CONF_DIR, the module looks for
+     the file in relation to current path, i.e. to the path where the
+     php script is executed.)
+          </simpara>
+         </listitem>
+         <listitem>
+       <simpara>
+       UDM_PARAM_STOPTABLE - Load stop words from the given SQL table. You may use 
+several StopwordTable commands. 
+     This command has no effect when compiled without SQL database support.
+          </simpara>
+         </listitem> 
+     </itemizedlist>
+    </refsect1>
+  </refentry>
+
+  <refentry id="function.udm-add-search-limit">
+   <refnamediv>
+    <refname>udm_add_search_limit</refname>
+    <refpurpose>Add various search limits</refpurpose>
+   </refnamediv>
+   <refsect1>
+    <title>Description</title>
+    <funcsynopsis>
+     <funcprototype>
+      <funcdef>int <function>udm_add_search_limit</function></funcdef>
+      <paramdef>int <parameter>agent</parameter></paramdef>
+      <paramdef>int <parameter>var</parameter></paramdef>
+      <paramdef>string <parameter>val</parameter></paramdef>
+     </funcprototype>
+    </funcsynopsis>
+    <para>
+     <function>udm_add_search_limit</function> returns <literal>TRUE</literal> on
+     success, <literal>FALSE</literal> on error. Adds search restrictions.
+    </para>
+    <para>
+     <parameter>agent</parameter> - a link to Agent,
+     received after call to <function>udm_alloc_agent</function>.
+     </para>
+     <para>
+     <parameter>var</parameter> - defines parameter, indicating limit.
+     </para>
+     <para>
+     <parameter>val</parameter> - defines value of the current parameter.
+     </para>
+     <para>
+     Possible <parameter>var</parameter> values:
+     </para>
+     <itemizedlist>
+      <listitem>
+      <simpara>
+      UDM_LIMIT_URL - defines document URL limitations to limit search through 
+subsection
+         of database. It supports SQL % and _  LIKE wildcards, where % matches any 
+number of characters, even zero characters,
+         and _ matches exactly one character. E.g. http://my.domain.__/catalog may 
+stand for http://my.domain.ru/catalog and http://my.domain.ua/catalog.
+      </simpara>
+     </listitem> 
+     <listitem>
+      <simpara>
+     UDM_LIMIT_TAG - defines site TAG limitations. In indexer-conf you can assign 
+specific TAGs to various sites and parts of a site. 
+     Tags in mnoGoSearch 3.1.x are lines, that may contain metasymbols % and _. 
+Metasymbols allow searching among groups of tags.
+     E.g. there are links with tags ABCD and ABCE, and search restriction is by ABC_ 
+- the search will be made among both of the tags.
+      </simpara>
+     </listitem>
+     <listitem>
+      <simpara>
+      UDM_LIMIT_LANG - defines document language limitations.
+      </simpara>
+     </listitem>
+     <listitem>
+      <simpara>
+      UDM_LIMIT_CAT - defines document category limitations. Categories are similar 
+to tag feature, but nested. So you can have
+      one category inside another and so on. You have to use two characters
+         for each level. Use a hex number going from 0-F or a 36 base number going 
+from 0-Z.   
+         Therefore a top-level category like 'Auto' would be 01. If it has a
+         subcategory like 'Ford', then it would be 01 (the parent category) and then
+         'Ford' which we will give 01. Put those together and you get 0101. If 'Auto'
+         had another subcategory named 'VW', then it's id would be 01 because it
+         belongs to the 'Ford' category and then 02 because it's the next category.
+         So it's id would be 0102. If VW had a sub category called 'Engine' then it's
+         id would start at 01 again and it would get the 'VW' id 02 and 'Auto' id of
+         01, making it 010201. If you want to search for sites under that category 
+then you pass it
+         cat=010201 in the url.
+      </simpara>
+     </listitem>
+    </itemizedlist>
+   </refsect1>
+  </refentry>
+  
+<refentry id="function.udm-clear-search-limits">
+   <refnamediv>
+    <refname>udm_clear_search_limits</refname>
+    <refpurpose>Clear all mnoGoSearch search restrictions</refpurpose>
+   </refnamediv>
+   <refsect1>
+    <title>Description</title>
+    <funcsynopsis>
+     <funcprototype>
+      <funcdef>int <function>udm_clear_search_limits</function></funcdef>
+      <paramdef>int <parameter>agent</parameter></paramdef>
+     </funcprototype>
+    </funcsynopsis>
+    <para>
+     <function>udm_clear_search_limits</function> resets defined search limitations 
+and returns <literal>TRUE</literal>.
+    </para>
+   </refsect1>
+  </refentry>
+
+  <refentry id="function.udm-find">
+   <refnamediv>
+    <refname>udm_find</refname>
+    <refpurpose>Perform search</refpurpose>
+   </refnamediv>
+   <refsect1>
+    <title>Description</title>
+    <funcsynopsis>
+     <funcprototype>
+      <funcdef>int <function>udm_find</function></funcdef>
+      <paramdef>int <parameter>agent</parameter></paramdef>
+      <paramdef>string <parameter>query</parameter></paramdef>
+     </funcprototype>
+    </funcsynopsis>
+    <para>
+     <function>udm_find</function> returns result link identifier on success,
+      <literal>FALSE</literal> on error.
+    </para>
+    <para>
+     The search itself. The first argument - session, the next one -
+     query itself.  To find something just type words you want to find
+     and press SUBMIT button.  For example, "mysql odbc". You should
+     not use quotes " in query, they are written here only to divide a
+     query from other text. mnoGoSearch will find all documents that
+     contain word "mysql" and/or word "odbc".  Best documents having
+     bigger weights will be displayed first.  If you use search mode
+     ALL, search will return documents that contain both (or more)
+     words you entered. In case you use mode ANY, the search will
+     return list of documents that contain any of the words you
+     entered.  If you want more advanced results you may use query
+     language.  You should select "bool" match mode in the search
+     from.
+    </para>
+    <simpara>
+     mnoGoSearch understands the following boolean operators:
+    </simpara>
+    <simpara>
+     &amp; - logical AND. For example, &quot;mysql &amp;
+     odbc&quot;. mnoGoSearch will find any URLs that contain both
+     &quot;mysql&quot; and &quot;odbc&quot;.
+    </simpara>
+    <simpara>
+     | - logical OR. For example &quot;mysql|odbc&quot;. mnoGoSearch
+     will find any URLs, that contain word &quot;mysql&quot; or word
+     &quot;odbc&quot;.
+    </simpara>
+    <simpara>
+     ~ - logical NOT. For example &quot;mysql &amp; ~odbc&quot;.
+     mnoGoSearch will find URLs that contain word &quot;mysql&quot;
+     and do not contain word &quot;odbc&quot; at the same time. Note
+     that ~ just excludes given word from results.  Query
+     &quot;~odbc&quot; will find nothing!
+    </simpara>
+    <simpara>
+     () - group command to compose more complex queries.  For example
+     &quot;(mysql | msql) &amp; ~postgres&quot;.  Query language is
+     simple and powerful at the same time. Just consider query as
+     usual boolean expression.
+    </simpara>
+   </refsect1>
+  </refentry>
+
+  <refentry id="function.udm-get-res-param">
+   <refnamediv>
+    <refname>udm_get_res_param</refname>
+    <refpurpose>Get mnoGoSearch result parameters</refpurpose>
+   </refnamediv>
+   <refsect1>
+    <title>Description</title>
+    <funcsynopsis>
+     <funcprototype>
+      <funcdef>string <function>udm_get_res_param</function></funcdef>
+      <paramdef>int <parameter>res</parameter></paramdef>
+      <paramdef>int <parameter>param</parameter></paramdef>
+     </funcprototype>
+    </funcsynopsis>
+    <para>
+     <function>udm_get_res_param</function> returns result parameter
+     value on success, <literal>FALSE</literal> on error.
+    </para>
+    <para>
+     <parameter>res</parameter> - a link to result identifier,
+     received after call to <function>udm_find</function>.
+    </para>
+    <para>
+     <parameter>param</parameter> - parameter identifier, may have the
+     following values:
+    </para>
+    <itemizedlist>
+      <listitem>
+      <simpara>
+       UDM_PARAM_NUM_ROWS - number of received found links on the current page.  It 
+is equal to
+       UDM_PARAM_PAGE_SIZE for all search pages, on the last page - the rest of links.
+      </simpara>
+     </listitem> 
+     <listitem>
+      <simpara>
+       UDM_PARAM_FOUND - total number of results matching the query.
+      </simpara>
+     </listitem>
+     <listitem>
+      <simpara>
+       UDM_PARAM_WORDINFO - information on the words found. E.g. search for "a good 
+book" will return "a: stopword, good:5637, book: 120"
+      </simpara>
+     </listitem>
+     <listitem>
+      <simpara>
+       UDM_PARAM_SEARCHTIME - search time in seconds.
+      </simpara>
+     </listitem>
+     <listitem>
+      <simpara>
+       UDM_PARAM_FIRST_DOC - the number of the first document displayed on current 
+page.
+      </simpara>
+     </listitem>
+     <listitem>
+      <simpara>
+       UDM_PARAM_LAST_DOC - the number of the last document displayed on current page.
+      </simpara>
+     </listitem>
+    </itemizedlist>
+   </refsect1>
+  </refentry>
+
+  <refentry id="function.udm-get-res-field">
+   <refnamediv>
+    <refname>udm_get_res_field</refname>
+    <refpurpose>Fetch mnoGoSearch result field</refpurpose>
+   </refnamediv>
+   <refsect1>
+    <title>Description</title>
+    <funcsynopsis>
+     <funcprototype>
+      <funcdef>string <function>udm_get_res_field</function></funcdef>
+      <paramdef>int <parameter>res</parameter></paramdef>
+      <paramdef>int <parameter>row</parameter></paramdef>
+         <paramdef>int <parameter>field</parameter></paramdef>
+     </funcprototype>
+    </funcsynopsis>
+    <para>
+     <function>udm_get_res_field</function> returns result field value on success, 
+<literal>FALSE</literal> on error.
+    </para>
+    <para>
+     <parameter>res</parameter> - a link to result identifier,
+     received after call to <function>udm_find</function>.
+    </para>
+    <para>
+     <parameter>row</parameter> - the number of the link on the current page. May 
+have values from 0 to 
+     <parameter>UDM_PARAM_NUM_ROWS</parameter>.
+    </para>
+    <para>
+     <parameter>field</parameter> - field identifier, may have the following values:
+    </para>
+    <itemizedlist>
+     <listitem>
+      <simpara>
+       UDM_FIELD_URL - document URL field
+      </simpara>
+     </listitem> 
+     <listitem>
+      <simpara>
+       UDM_FIELD_CONTENT - document Content-type field (for example, text/html).
+      </simpara>
+     </listitem>
+     <listitem>
+      <simpara>
+       UDM_FIELD_TITLE - document title field.
+      </simpara>
+     </listitem>
+     <listitem>
+      <simpara>
+       UDM_FIELD_KEYWORDS - document keywords field (from META KEYWORDS tag).
+      </simpara>
+     </listitem>
+     <listitem>
+      <simpara>
+       UDM_FIELD_DESC - document description field (from META DESCRIPTION tag).
+      </simpara>
+     </listitem>
+     <listitem>
+      <simpara>
+       UDM_FIELD_TEXT - document body text (the first couple of lines to give an idea
+        of what the document is about).
+      </simpara>
+     </listitem>
+     <listitem>
+      <simpara>
+       UDM_FIELD_SIZE - document size.
+      </simpara>
+     </listitem>
+     <listitem>
+      <simpara>
+       UDM_FIELD_URLID - unique URL ID of the link.
+      </simpara>
+     </listitem>
+     <listitem>
+      <simpara>
+       UDM_FIELD_RATING  - page rating (as calculated by mnoGoSearch).
+      </simpara>
+     </listitem>
+     <listitem>
+      <simpara>
+       UDM_FIELD_MODIFIED - last-modified field in unixtime format.
+      </simpara>
+     </listitem>
+     <listitem>
+      <simpara>
+       UDM_FIELD_ORDER - the number of the current document in set of found documents.
+      </simpara>
+     </listitem>
+     <listitem>
+      <simpara>
+       UDM_FIELD_CRC - document CRC.
+      </simpara>
+     </listitem>
+    </itemizedlist>
+   </refsect1>
+  </refentry>
+
+  <refentry id="function.udm-free-res">
+   <refnamediv>
+    <refname>udm_free_res</refname>
+    <refpurpose>Free mnoGoSearch result</refpurpose>
+   </refnamediv>
+   <refsect1>
+    <title>Description</title>
+    <funcsynopsis>
+     <funcprototype>
+      <funcdef>int <function>udm_free_res</function></funcdef>
+      <paramdef>int <parameter>res</parameter></paramdef>
+     </funcprototype>
+    </funcsynopsis>
+    <para>
+     <function>udm_free_res</function> returns <literal>TRUE</literal> on success, 
+<literal>FALSE</literal> on error.
+    </para>
+    <para>
+     <parameter>res</parameter> - a link to result identifier,
+     received after call to <function>udm_find</function>.
+    </para>
+    <para>
+     Freeing up memory allocated for results.
+    </para>
+   </refsect1>
+  </refentry>
+
+  <refentry id="function.udm-free-agent">
+   <refnamediv>
+    <refname>udm_free_agent</refname>
+    <refpurpose>Free mnoGoSearch session</refpurpose>
+   </refnamediv>
+   <refsect1>
+    <title>Description</title>
+    <funcsynopsis>
+     <funcprototype>
+      <funcdef>int <function>udm_free_agent</function></funcdef>
+      <paramdef>int <parameter>agent</parameter></paramdef>
+     </funcprototype>
+    </funcsynopsis>
+    <para>
+     <function>udm_free_agent</function> returns <literal>TRUE</literal> on success, 
+<literal>FALSE</literal> on error.
+    </para>
+    <para>
+     <parameter>agent</parameter> - link to agent identifier, received
+     after call to <function>udm_alloc_agent</function>.
+    </para>
+    <para>
+     Freeing up memory allocated for agent session.
+    </para>
+   </refsect1>
+  </refentry>
+
+  <refentry id="function.udm-errno">
+   <refnamediv>
+    <refname>udm_errno</refname>
+    <refpurpose>Get mnoGoSearch error number</refpurpose>
+   </refnamediv>
+   <refsect1>
+    <title>Description</title>
+    <funcsynopsis>
+     <funcprototype>
+      <funcdef>int <function>udm_errno</function></funcdef>
+      <paramdef>int <parameter>agent</parameter></paramdef>
+     </funcprototype>
+    </funcsynopsis>
+    <para>
+     <function>udm_errno</function> returns mnoGoSearch error number,
+     zero if no error.
+    </para>
+    <para>
+     <parameter>agent</parameter> - link to agent identifier, received
+     after call to <function>udm_alloc_agent</function>.
+    </para>
+    <para>
+     Receiving numeric agent error code.
+    </para>
+   </refsect1>
+  </refentry>
+
+  <refentry id="function.udm-error">
+   <refnamediv>
+    <refname>udm_error</refname>
+    <refpurpose>Get mnoGoSearch error message</refpurpose>
+   </refnamediv>
+   <refsect1>
+    <title>Description</title>
+    <funcsynopsis>
+     <funcprototype>
+      <funcdef>string <function>udm_error</function></funcdef>
+      <paramdef>int <parameter>agent</parameter></paramdef>
+     </funcprototype>
+    </funcsynopsis>
+    <para>
+     <function>udm_error</function> returns mnoGoSearch error message,
+     empty string if no error.
+    </para>
+    <para>
+     <parameter>agent</parameter> - link to agent identifier, received
+     after call to <function>udm_alloc_agent</function>.
+    </para>
+    <para>
+     Receiving agent error message.
+    </para>
+   </refsect1>
+  </refentry>
+ </reference>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:"../../manual.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
+

Reply via email to