noribsd         Wed Feb 28 03:39:55 2001 EDT

  Added files:                 
    /phpdoc/kr/functions        bzip2.xml ctype.xml mnogosearch.xml 
  Log:
  added three missing files into /kr/functions/ directory
  
  

Index: phpdoc/kr/functions/bzip2.xml
+++ phpdoc/kr/functions/bzip2.xml
 <reference id="ref.bzip2">
  <title>Bzip2 Compression Functions</title>
  <titleabbrev>Bzip2</titleabbrev>
  <partintro>
   <para>
    This module uses the functions of the <ulink
    url="&url.bzip2;">bzip2</ulink> library by Julian Seward to
    transparently read and write bzip2 (.bz2) compressed files.
   </para>
   <para>
    bzip2 support in PHP is not enabled by default.  You will need to
    use the <parameter>--with-bz2[=DIR]</parameter> configuration
    option when compiling php to enable bzip2 support. This module
    requires bzip2/libbzip2 version &gt;= 1.0.x.
   </para>

   <sect1 id="bzip2-example">
    <title>Small code example</title>
    <para>
     This example opens a temporary file and writes a test string to
     it, then prints out the contents of the file.
    </para>
    <example>
     <title>Small bzip2 Example</title>
     <programlisting role="php">
&lt;?php

$filename = "/tmp/testfile.bz2";
$str = "This is a test string.\n";

// open file for writing
$bz = bzopen($filename, "w");

// write string to file
bzwrite($bz, $str);

// close file
bzclose($bz);

// open file for reading
$bz = bzopen($filename, "r");

// read 10 characters
print bzread($bz, 10);

// output until end of the file (or the next 1024 char) and close it.  
print bzread($bz);

bzclose($bz);

?>
     </programlisting>
    </example>
   </sect1>
  </partintro>


  <refentry id="function.bzclose">
   <refnamediv>
    <refname>bzclose</refname>
    <refpurpose>Close a bzip2 file pointer</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcprototype>
      <funcdef>int <function>bzclose</function></funcdef>
      <paramdef>int <parameter>bz</parameter></paramdef>
     </funcprototype>
    </funcsynopsis>
    <para>
     Closes the bzip2 file referenced by the pointer <parameter>bz</parameter>.
    </para>
    <para>
     Returns true on success and false on failure.
    </para>
    <para>
     The file pointer must be valid, and must point to a file
     successfully opened by <function>bzopen</function>.
    </para>
    <para>
     See also <function>bzopen</function>.
    </para>
   </refsect1>
  </refentry>

  
  <refentry id="function.bzcompress">
   <refnamediv>
    <refname>bzcompress</refname>
    <refpurpose>Compress a string into bzip2 encoded data</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcprototype>
      <funcdef>string <function>bzcompress</function></funcdef>
      <paramdef>string <parameter>source</parameter></paramdef>
      <paramdef>int
       <parameter><optional>blocksize</optional></parameter>
      </paramdef>
      <paramdef>int 
       <parameter><optional>workfactor</optional></parameter>
      </paramdef>
     </funcprototype>
    </funcsynopsis>
    <para>
     <function>bzcompress</function> compresses the
     <parameter>source</parameter> string and returns it as bzip2
     encoded data.
    </para>
    <para>
     The optional parameter <parameter>blocksize</parameter> specifies
     the blocksize used during compression and should be a number from
     1 to 9 with 9 giving the best compression, but using more
     resources to do so. <parameter>blocksize</parameter> defaults to
     4.
    </para>
    <para>
     The optional parameter <parameter>workfactor</parameter> controls
     how the compression phase behaves when presented with worst case,
     highly repetitive, input data.  The value can be between 0 and
     250 with 0 being a special case and 30 being the default
     value. Regardless of the <parameter>workfactor</parameter>, the
     generated output is the same.
    </para>
    <para>
     <example>
      <title><function>bzcompress</function> Example</title>
      <programlisting role="php">
$str = "sample data";
$bzstr = bzcompress($str, 9);
      </programlisting>
     </example>
    </para>
    <para>
     See also <function>bzdecompress</function>.
    </para>
   </refsect1>
  </refentry>


  <refentry id="function.bzdecompress">
   <refnamediv>
    <refname>bzdecompress</refname>
    <refpurpose>Decompresses bzip2 encoded data</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcprototype>
      <funcdef>string <function>bzdecompress</function></funcdef>
      <paramdef>string <parameter>source</parameter></paramdef>
      <paramdef>int
       <parameter><optional>small</optional></parameter>
      </paramdef>
     </funcprototype>
    </funcsynopsis>
    <para>
     <function>bzdecompress</function> decompresses the
     <parameter>source</parameter> string containing bzip2 encoded
     data and returns it.  If the optional parameter
     <parameter>small</parameter> is true, an alternative
     decompression algorithm will be used which uses less memory (the
     maximum memory requirement drops to around 2300K) but works at
     roughly half the speed.  See the <ulink url="&url.bzip2;">bzip2
     documentation</ulink> for more information about this feature.
    </para>
    <para>
     <example>
      <title><function>bzdecompress</function></title>
      <programlisting role="php">
$str = $bzdecompress($bzstr);
      </programlisting>
     </example>
    </para>
    <para>
     See also <function>bzcompress</function>.
    </para>
   </refsect1>
  </refentry>


  <refentry id="function.bzerrno">
   <refnamediv>
    <refname>bzerrno</refname>
    <refpurpose>Returns a bzip2 error number</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcprototype>
      <funcdef>int <function>bzerrno</function></funcdef>
      <paramdef>int <parameter>bz</parameter></paramdef>
     </funcprototype>
    </funcsynopsis>
    <para>
     Returns the error number of any bzip2 error returned by the file
     pointer <parameter>bz</parameter>.
    </para>
    <para>
     See also <function>bzerror</function> and <function>bzerrstr</function>.
    </para>
   </refsect1>
  </refentry>


  <refentry id="function.bzerror">
   <refnamediv>
    <refname>bzerror</refname>
    <refpurpose>Returns the bzip2 error number and error string in an 
array</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcprototype>
      <funcdef>array <function>bzerror</function></funcdef>
      <paramdef>int <parameter>bz</parameter></paramdef>
     </funcprototype>
    </funcsynopsis>
    <para>
     Returns the error number and error string, in an associative array,
     of any bzip2 error returned by the file pointer
     <parameter>bz</parameter>.
    </para>
    <para>
     <example>
      <title><function>bzerror</function> Example</title>
      <programlisting role="php">
$error = bzerror($bz);

echo $error["errno"];
echo $error["errstr"];
      </programlisting>
     </example>
    </para>
    <para>
     See also <function>bzerrno</function> and <function>bzerrstr</function>.
    </para>
   </refsect1>
  </refentry>


  <refentry id="function.bzerrstr">
   <refnamediv>
    <refname>bzerrstr</refname>
    <refpurpose>Returns a bzip2 error string</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcprototype>
      <funcdef>string <function>bzerrstr</function></funcdef>
      <paramdef>int <parameter>bz</parameter></paramdef>
     </funcprototype>
    </funcsynopsis>
    <para>
     Returns the error string of any bzip2 error returned by the file
     pointer <parameter>bz</parameter>.
    </para>
    <para>
     See also <function>bzerrno</function> and <function>bzerror</function>.
    </para>
   </refsect1>
  </refentry>


  <refentry id="function.bzflush">
   <refnamediv>
    <refname>bzflush</refname>
    <refpurpose>Force a write of all buffered data</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcprototype>
      <funcdef>int <function>bzflush</function></funcdef>
      <paramdef>int <parameter>bz</parameter></paramdef>
     </funcprototype>
    </funcsynopsis>
    <para>
     Forces a write of all buffered bzip2 data for the file pointer
     <parameter>bz</parameter>.
    </para>
    <para>
     Returns true on success, false on failure.
    </para>
    <para>
     See also <function>bzread</function> and <function>bzwrite</function>.
    </para>
   </refsect1>
  </refentry>


  <refentry id="function.bzopen">
   <refnamediv>
    <refname>bzopen</refname>
    <refpurpose>Open a bzip2 compressed file</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcprototype>
      <funcdef>int <function>bzopen</function></funcdef>
      <paramdef>string <parameter>filename</parameter></paramdef>
      <paramdef>string <parameter>mode</parameter></paramdef>
     </funcprototype>
    </funcsynopsis>
    <para>
     Opens a bzip2 (.bz2) file for reading or writing.
     <parameter>filename</parameter> is the name of the file to
     open. <parameter>mode</parameter> is similar to the
     <function>fopen</function> function (`r' for read, `w' for write, etc.).
    </para>
    <para>
     If the open fails, the function returns false, otherwise it
     returns a pointer to the newly opened file.
    </para>
    <para>
     <example>
      <title><function>bzopen</function> Example</title>
      <programlisting role="php">
$bz = bzopen("/tmp/foo.bz2", "r");
      </programlisting>
     </example>
    </para>
    <para>
     See also <function>bzclose</function>.
    </para>
   </refsect1>
  </refentry>


  <refentry id="function.bzread">
   <refnamediv>
    <refname>bzread</refname>
    <refpurpose>Binary safe bzip2 file read</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcprototype>
      <funcdef>string <function>bzread</function></funcdef>
      <paramdef>int <parameter>bz</parameter></paramdef>
      <paramdef>int 
       <parameter><optional>length</optional></parameter>
      </paramdef>
     </funcprototype>
    </funcsynopsis>
    <para>
     <function>bzread</function> reads up to
     <parameter>length</parameter> bytes from the bzip2 file pointer
     referenced by <parameter>bz</parameter>.  Reading stops when
     <parameter>length</parameter> (uncompressed) bytes have been read
     or EOF is reached, whichever comes first.  If the optional
     parameter <parameter>length</parameter> is not specified,
     <function>bzread</function> will read 1024 (uncompressed) bytes
     at a time.
    </para>
    <para>
     <example>
      <title><function>bzread</function> Example</title>
      <programlisting role="php">
$bz = bzopen("/tmp/foo.bz2", "r");
$str = bzread($bz, 2048);
echo $str;
      </programlisting>
     </example>
    </para>
    <para>
     See also <function>bzwrite</function> and <function>bzopen</function>.
    </para>
   </refsect1>
  </refentry>


  <refentry id="function.bzwrite">
   <refnamediv>
    <refname>bzwrite</refname>
    <refpurpose>Binary safe bzip2 file write</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcprototype>
      <funcdef>int <function>bzwrite</function></funcdef>
      <paramdef>int <parameter>bz</parameter></paramdef>
      <paramdef>string <parameter>data</parameter></paramdef>
      <paramdef>int
       <parameter><optional>length</optional></parameter>
      </paramdef>
     </funcprototype>
    </funcsynopsis>
    <para>
     <function>bzwrite</function> writes the contents of the string
     <parameter>data</parameter> to the bzip2 file stream pointed to
     by <parameter>bz</parameter>. If the optional
     <parameter>length</parameter> argument is given, writing will stop
     after length (uncompressed) bytes have been written or the end of
     string is reached, whichever comes first.
    </para>
    <para>
     <example>
      <title><function>bzwrite</function> Example</title>
      <programlisting role="php">
$str = "uncompressed data";
$bz = bzopen("/tmp/foo.bz2", "w");
bzwrite($bz, $str, strlen($str));
      </programlisting> 
     </example>
    </para>
    <para>
     See also <function>bzread</function> and <function>bzopen</function>.
    </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:
-->

Index: phpdoc/kr/functions/ctype.xml
+++ phpdoc/kr/functions/ctype.xml
 <reference id="ref.ctype">
  <title>Character type functions</title>
  <titleabbrev>ctype</titleabbrev>

  <partintro>
   <para>
    These functions check whether a character or string
    falls into a certain character class according to the i
    current locale.
   </para>
   <para>
    When called with an integer argument theese functions 
    behave exactly like their C counterparts.
   </para>
   <para>
    When called with a string argument they will check
    every character in the string and will only return
    true if every character in the string matches the
    requested criteria.
   </para>
   <para>
    Passing anything else but a string or integer will 
    return false immediately.
   </para>
   <warning>
    <simpara>
     These functions are new as of PHP 4.0.4 and might change their
     name in the near future.  Suggestions are to change them to
     <function>ctype_issomething</function> instead of
     <function>ctype_somthing</function> or even to make them part of
     <filename>ext/standard</filename> and use their original C-names,
     although this would possibly lead to further confusion regarding
     the <function>isset</function>
     vs. <function>is_sometype</function> problem.
    </simpara>
   </warning>
  </partintro>


  <refentry id="function.ctype-alnum">
   <refnamediv>
    <refname>ctype_alnum</refname>
    <refpurpose>Check for alphanumeric character(s)</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcprototype>
      <funcdef>bool <function>ctype_alnum</function></funcdef>
     <paramdef>string <parameter>c</parameter></paramdef>
     </funcprototype>
    </funcsynopsis>
    <para>
     See also <function>setlocale</function>.
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.ctype-alpha">
   <refnamediv>
    <refname>ctype_alpha</refname>
    <refpurpose>Check for alphabetic character(s)</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcprototype>
      <funcdef>bool <function>ctype_alpha</function></funcdef>
     <paramdef>string <parameter>c</parameter></paramdef>
     </funcprototype>
    </funcsynopsis>
    <para>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.ctype-cntrl">
   <refnamediv>
    <refname>ctype_cntrl</refname>
    <refpurpose>Check for control character(s)</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcprototype>
      <funcdef>bool <function>ctype_cntrl</function></funcdef>
     <paramdef>string <parameter>c</parameter></paramdef>
     </funcprototype>
    </funcsynopsis>
    <para>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.ctype-digit">
   <refnamediv>
    <refname>ctype_digit</refname>
    <refpurpose>Check for numeric character(s)</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcprototype>
      <funcdef>bool <function>ctype_digit</function></funcdef>
     <paramdef>string <parameter>c</parameter></paramdef>
     </funcprototype>
    </funcsynopsis>
    <para>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.ctype-lower">
   <refnamediv>
    <refname>ctype_lower</refname>
    <refpurpose>Check for lowercase character(s)</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcprototype>
      <funcdef>bool <function>ctype_lower</function></funcdef>
     <paramdef>string <parameter>c</parameter></paramdef>
     </funcprototype>
    </funcsynopsis>
    <para>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.ctype-graph">
   <refnamediv>
    <refname>ctype_graph</refname>
    <refpurpose>Check for any printable character(s) except space</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcprototype>
      <funcdef>bool <function>ctype_graph</function></funcdef>
     <paramdef>string <parameter>c</parameter></paramdef>
     </funcprototype>
    </funcsynopsis>
    <para>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.ctype-print">
   <refnamediv>
    <refname>ctype_print</refname>
    <refpurpose>Check for printable character(s)</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcprototype>
      <funcdef>bool <function>ctype_print</function></funcdef>
     <paramdef>string <parameter>c</parameter></paramdef>
     </funcprototype>
    </funcsynopsis>
    <para>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.ctype-punct">
   <refnamediv>
    <refname>ctype_punct</refname>
    <refpurpose>
     Check for any printable character which is not whitespace or an
     alphanumeric character
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcprototype>
      <funcdef>bool <function>ctype_punct</function></funcdef>
     <paramdef>string <parameter>c</parameter></paramdef>
     </funcprototype>
    </funcsynopsis>
    <para>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.ctype-space">
   <refnamediv>
    <refname>ctype_space</refname>
    <refpurpose>Check for whitespace character(s)</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcprototype>
      <funcdef>bool <function>ctype_space</function></funcdef>
     <paramdef>string <parameter>c</parameter></paramdef>
     </funcprototype>
    </funcsynopsis>
    <para>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.ctype-upper">
   <refnamediv>
    <refname>ctype_upper</refname>
    <refpurpose>Check for uppercase character(s)</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcprototype>
      <funcdef>bool <function>ctype_upper</function></funcdef>
     <paramdef>string <parameter>c</parameter></paramdef>
     </funcprototype>
    </funcsynopsis>
    <para>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.ctype-xdigit">
   <refnamediv>
    <refname>ctype_xdigit</refname>
    <refpurpose>
     Check for character(s) representing a hexadecimal digit
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcprototype>
      <funcdef>bool <function>ctype_xdigit</function></funcdef>
     <paramdef>string <parameter>c</parameter></paramdef>
     </funcprototype>
    </funcsynopsis>
    <para>
    </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:
-->


Index: phpdoc/kr/functions/mnogosearch.xml
+++ phpdoc/kr/functions/mnogosearch.xml
 <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>
   <para>
   mnoGoSearch is a full-featured search engine software for intranet and internet 
servers, 
   distributed under the GNU license. mnoGoSearch has number of unique features, which 
makes 
   it appropriate for a wide range of application from search within your site to a 
specialized 
   search system such as cooking recipes or newspaper search, ftp archive search, news 
articles search, 
   etc. It offers full-text indexing and searching for HTML, PDF, and text documents. 
mnoGoSearch 
   consists of two parts. The first is an indexing mechanism (indexer). The purpose of 
indexer is 
   to walk through HTTP, FTP, NEWS servers or local files, recursively grabbing all 
the documents 
   and storing meta-data about that documents in a SQL database in a smart and 
effective manner. 
   After every document is referenced by its corresponding URL, meta-data collected by 
indexer is 
   used later in a search process. The search is performed via Web interface. C CGI, 
PHP and Perl 
   search front ends are included.
   </para>
   <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_PHRASE - phrase 
search; 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_PHRASE_MODE - defines whether index database using phrases ("phrase" 
parameter in indexer.conf). 
        Possible values: UDM_PHRASE_ENABLED and UDM_PHRASE_DISABLED.
        Please note, that if phrase search is enabled (UDM_PHRASE_ENABLED), 
        it is still possible to do search in any mode (ANY, ALL, BOOL or PHRASE).
        In 3.1.10 version of mnoGoSearch phrase search is supported only in sql and 
buuilt-in database modes, 
        while beginning with 3.1.11 phrases are supported in cachemode as well. 
           </simpara>
           <simpara>
           Examples of phrase search:
       </simpara>
       <simpara>
       "Arizona desert" - This query returns all indexed documents that contain 
"Arizona desert" as a phrase. Notice that you need to put double quotes around the 
phrase
       </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>
           <listitem>
     <simpara>
         
        UDM_PARAM_WEIGHT_FACTOR - represents weight factors for specific document 
parts. Currently body, title, keywords, description, url are supported.
        To activate this feature please use degrees of 2 in *Weight commands of 
        the indexer.conf. Let's imagine that we have these weights:
        </simpara>
        <simpara>URLWeight     1</simpara>
        <simpara>BodyWeight    2</simpara>
        <simpara>TitleWeight   4</simpara>
    <simpara>KeywordWeight 8</simpara> 
    <simpara>DescWeight    16</simpara>
        <simpara>
        As far as indexer uses bit OR operation for word weights when some
        word presents several time in the same document, it is possible at search 
        time to detect word appearance in different document parts. Word which 
        appears only in the body will have 00000010 argegate weight (in binary 
notation).
        Word used in all document parts will have 00011111 aggregate weight.
        </simpara>
        <simpara>
        This parameter's value is a string of hex digits ABCDE. Each digit is a factor 
for corresponding bit in word weight. For the given above weights 
        configuration:
     </simpara>
     <simpara>E is a factor for weight 1  (URL Weight bit)</simpara>
     <simpara>D is a factor for weight 2  (BodyWeight bit)</simpara>
     <simpara>C is a factor for weight 4  (TitleWeight bit)</simpara>
     <simpara>B is a factor for weight 8  (KeywordWeight bit)</simpara>
     <simpara>A is a factor for weight 16 (DescWeight bit)</simpara>
     <simpara>
     Examples:
         </simpara>
         <simpara>
         UDM_PARAM_WEIGHT_FACTOR=00001 will search through URLs only.
         </simpara>     
         <simpara>
     UDM_PARAM_WEIGHT_FACTOR=00100 will search through Titles only.
         </simpara>     
         <simpara>
     UDM_PARAM_WEIGHT_FACTOR=11100 will search through Title,Keywords,Desctription but 
not through URL and Body.
         </simpara>
         <simpara>
     UDM_PARAM_WEIGHT_FACTOR=F9421 will search through:
      </simpara>
      <simpara>Description with factor 15  (F hex)</simpara>
      <simpara>Keywords with factor 9</simpara>
      <simpara>Title with factor  4</simpara>
      <simpara>Body with factor 2</simpara>
      <simpara>URL with factor 1</simpara>
      <simpara>
        If UDM_PARAM_WEIGHT_FACTOR variable is ommited, original weight value is
        taken to sort results. For a given above weight configuration it means
        that document description has a most big weight 16.
      </simpara>
          </listitem>
          <listitem>
       <simpara>
         UDM_PARAM_WORD_MATCH - word match. You may use this parameter to choose word 
match type. This feature works only 
         in "single" and "multi" modes using SQL based and built-in database. It does 
not work in cachemode and other modes 
         since they use word CRC and do not support substring search.
         Available values:
           </simpara>
         <simpara>UDM_MATCH_BEGIN - word beginning match;</simpara>
     <simpara>UDM_MATCH_END - word ending match;</simpara>
     <simpara>UDM_MATCH_WORD - whole word match;</simpara>
     <simpara>UDM_MATCH_SUBSTR - word substring match.</simpara>
      </listitem>
      <listitem>
       <simpara>
         UDM_PARAM_MIN_WORD_LEN - defines minimal word length. 
         Any word shorter this limit is considered to be a stopword. Please note that 
this paraneter value is inclusive, 
         i.e. if UDM_PARAM_MIN_WORD_LEN=3, a word 3 characters long will not be 
considered a stopword, while
         a word 2 characters long will be. Default value is 1.
           </simpara>
      </listitem>    
      <listitem>
       <simpara>
       UDM_PARAM_ISPELL_PREFIXES - Possible values: UDM_PREFIXES_ENABLED and 
UDM_PREFIXES_DISABLED, 
       that respectively enable or disable using prefixes. E.g. if a word "tested" is 
in search query, also words like "test", "testing", etc.
       Only suffixes are supported by default. Prefixes usually change word meanings, 
for example if somebody is searching for the word "tested" 
       one hardly wants "untested"  to be found. Prefixes support may also be found 
useful for site's 
           spelling checking purposes. In order to enable ispell, you have to load 
ispell data with <function>udm_load_ispell_data</function>.
           </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>
     <listitem>
      <simpara>
      UDM_LIMIT_DATE - defines limitation by date document was modified. 
      </simpara>
      <simpara>
      Format of parameter value: a string with first character &lt; or &gt;, then with 
no space - date in unixtime format, for example:
      </simpara>
      <simpara>
      Udm_Add_Search_Limit($udm,UDM_LIMIT_DATE,"&lt;908012006");
      </simpara>
      <simpara>
      If &gt; character is used, then search will be restricted to those documents 
having modification date greater than entered.
      If &lt;, then smaller.
      </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-load-ispell-data">
   <refnamediv>
    <refname>udm_load_ispell_data</refname>
    <refpurpose>Load ispell data</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcprototype>
      <funcdef>int <function>udm_load_ispell_data</function></funcdef>
      <paramdef>int <parameter>agent</parameter></paramdef>
      <paramdef>int <parameter>var</parameter></paramdef>
      <paramdef>string <parameter>val1</parameter></paramdef>
      <paramdef>string <parameter>val2</parameter></paramdef>
      <paramdef>int <parameter>flag</parameter></paramdef>
     </funcprototype>
    </funcsynopsis>
    <para>
     <function>udm_load_ispell_data</function> loads ispell data. Returns 
<literal>TRUE</literal> on success, <literal>FALSE</literal> on error.</para>
    <para>
     <parameter>agent</parameter> - agent link identifier, received after call to 
<function>udm_alloc_agent</function>.
    </para>
    <para>
     <parameter>var</parameter> - parameter, indicating the source for ispell data. 
May have the following values:
    </para>
    <note>
    <para>
    It is recommended to load ispell data from files, since in mnogosearch 3.1.10 it 
is the fastest. In later versions
    it is planned to optimize loading in UDM_ISPELL_TYPE_DB mode as well, so you just 
try several modes to find the best for you.
    </para>
    </note>
    <itemizedlist>
     <listitem>
    <simpara>
    UDM_ISPELL_TYPE_DB - indicates that ispell data should be loaded from SQL. In this 
case, parameters <parameter>val1</parameter> and <parameter>val2</parameter> are 
ignored and
    should be left blank. <parameter>flag</parameter> should be equal to 
<literal>1</literal>.
    </simpara>
    <note>
    <para>
    <parameter>flag</parameter> indicates that after loading ispell data from defined 
source it sould be sorted (it is necessary for correct functioning of ispell).
    In case of loading ispell data from files there may be several calls to 
<function>udm_load_ispell_data</function>, and there is no sense to sort data after 
every call, but only after the last one.
    Since in db mode all the data is loaded by one call, this parameter should have 
the value <literal>1</literal>.
    In this mode in case of error, e.g. if ispell tables are absent, the function will 
return <literal>FALSE</literal> and code and error message will be accessible through 
<function>udm_error</function> and <function>udm_errno</function>.
    </para>
    </note>
    <simpara>Example:</simpara>
    <informalexample>
    <programlisting role="C">
           if (! Udm_Load_Ispell_Data($udm,UDM_ISPELL_TYPE_DB,'','',1)) {
              printf("Error #%d: '%s'\n",Udm_Errno($udm),Udm_Error($udm));
              exit;
           }
        </programlisting>
        </informalexample>
     </listitem>
     <listitem>
     <para>
     UDM_ISPELL_TYPE_AFFIX - indicates that ispell data should be loaded from file and 
initiates loading affixes file.
     In this case <parameter>val1</parameter> defines double letter language code for 
which affixes are loaded, 
     and <parameter>val2</parameter> - file path. Please note, that if a relative path 
entered, the module looks for
     the file not in UDM_CONF_DIR, but in relation to current path, i.e. to the path 
where the script is executed.
     In case of error in this mode, e.g. if file is absent, the function will return 
<literal>FALSE</literal>, and an error message will be displayed.
     Error message text cannot be accessed through <function>udm_error</function> and 
<function>udm_errno</function>, since those functions
     can only return messages associated with SQL. Please, see 
<parameter>flag</parameter> parameter description in UDM_ISPELL_TYPE_DB.
     </para>
     <simpara>Example:</simpara>
    <informalexample>
    <programlisting role="C">
           if ((! 
Udm_Load_Ispell_Data($udm,UDM_ISPELL_TYPE_AFFIX,'en','/opt/ispell/en.aff',0)) ||
               (! 
Udm_Load_Ispell_Data($udm,UDM_ISPELL_TYPE_AFFIX,'ru','/opt/ispell/ru.aff',0)) ||
               (! 
Udm_Load_Ispell_Data($udm,UDM_ISPELL_TYPE_SPELL,'en','/opt/ispell/en.dict',0)) ||
               (! 
Udm_Load_Ispell_Data($udm,UDM_ISPELL_TYPE_SPELL,'ru','/opt/ispell/ru.dict',1))) {
              exit;
           }
        </programlisting>
        </informalexample>
        <note>
        <para>
        <parameter>flag</parameter> is equal to <literal>1</literal> only in the last 
call.
        </para>
        </note>
         </listitem>
         <listitem>
         <para>
         UDM_ISPELL_TYPE_SPELL - indicates that ispell data should be loaded from file 
and initiates loading of ispell dictionary file.
         In this case <parameter>val1</parameter> defines double letter language code 
for which affixes are loaded, 
     and <parameter>val2</parameter> - file path. Please note, that if a relative path 
entered, the module looks for
     the file not in UDM_CONF_DIR, but in relation to current path, i.e. to the path 
where the script is executed.
     In case of error in this mode, e.g. if file is absent, the function will return 
<literal>FALSE</literal>, and an error message will be displayed.
     Error message text cannot be accessed through <function>udm_error</function> and 
<function>udm_errno</function>, since those functions
     can only return messages associated with SQL. Please, see 
<parameter>flag</parameter> parameter description in UDM_ISPELL_TYPE_DB.
     </para> 
     <simpara>Example:</simpara>
    <informalexample>
    <programlisting role="C">
           if ((! 
Udm_Load_Ispell_Data($udm,UDM_ISPELL_TYPE_AFFIX,'en','/opt/ispell/en.aff',0)) ||
               (! 
Udm_Load_Ispell_Data($udm,UDM_ISPELL_TYPE_AFFIX,'ru','/opt/ispell/ru.aff',0)) ||
               (! 
Udm_Load_Ispell_Data($udm,UDM_ISPELL_TYPE_SPELL,'en','/opt/ispell/en.dict',0)) ||
               (! 
Udm_Load_Ispell_Data($udm,UDM_ISPELL_TYPE_SPELL,'ru','/opt/ispell/ru.dict',1))) {
              exit;
           }
        </programlisting>
        </informalexample>
        <note>
        <para>
        <parameter>flag</parameter> is equal to <literal>1</literal> only in the last 
call.
        </para>
        </note>
         </listitem>
        </itemizedlist> 
   </refsect1>
  </refentry>
  
  <refentry id="function.udm-free-ispell-data">
   <refnamediv>
    <refname>udm_free_ispell_data</refname>
    <refpurpose>Free memory allocated for ispell data</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <funcsynopsis>
     <funcprototype>
      <funcdef>int <function>udm_free_ispell_data</function></funcdef>
      <paramdef>int <parameter>agent</parameter></paramdef>
     </funcprototype>
    </funcsynopsis>
    <para>
     <function>udm_free_ispell_data</function> always returns <literal>TRUE</literal>.
    </para>
    <para>
     <parameter>agent</parameter> - agent link identifier, received after call to 
<function>udm_alloc_agent</function>.
    </para>
    <note>
    <para>
     In mnoGoSearch 3.1.10 this function is not yet implemented, it is added for 
compatibility with future versions and does not perform anything yet.
    </para>
    </note>
   </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