dim             Fri Mar  2 06:59:18 2001 EDT

  Modified files:              
    /phpdoc/en/functions        mnogosearch.xml 
  Log:
  Added server ispell mode
  
  
Index: phpdoc/en/functions/mnogosearch.xml
diff -u phpdoc/en/functions/mnogosearch.xml:1.10 
phpdoc/en/functions/mnogosearch.xml:1.11
--- phpdoc/en/functions/mnogosearch.xml:1.10    Fri Mar  2 04:01:45 2001
+++ phpdoc/en/functions/mnogosearch.xml Fri Mar  2 06:59:18 2001
@@ -642,12 +642,15 @@
     <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.
+    After using this function to free memory allocated for ispell data, please use 
+    <function>udm_free_ispell_data</function>, even if you use UDM_ISPELL_TYPE_SERVER 
+mode.
     </para>
-    </note>
+    <para>
+    The fastest mode is UDM_ISPELL_TYPE_SERVER. UDM_ISPELL_TYPE_TEXT is slower 
+    and UDM_ISPELL_TYPE_DB is the slowest. The above pattern is true for mnoGoSearch 
+3.1.10 - 3.1.11. 
+    It is planned to speed up DB mode in future versions and it is going to be faster 
+than TEXT mode.
+    </para>
     <itemizedlist>
      <listitem>
     <simpara>
@@ -725,6 +728,44 @@
        <parameter>flag</parameter> is equal to <literal>1</literal> only in the last 
call.
        </para>
        </note>
+        </listitem>
+        <listitem>
+        <para>
+        UDM_ISPELL_TYPE_SERVER - enables spell server support. 
+<parameter>val1</parameter> parameter indicates 
+        address of the host running spell server. <parameter>val2</parameter> is not 
+used yet, but 
+        in future releases it is going to indicate number of port used by spell 
+server. 
+        <parameter>flag</parameter> parameter in this case is not needed since ispell 
+data is stored 
+        on spellserver already sorted.  
+        </para>
+        <para>
+       Spelld server reads spell-data from a separate configuration file
+       (/usr/local/mnogosearch/etc/spelld.conf by default), sorts it and stores in
+       memory. With clients server communicates in two ways: to indexer all the
+       data is transferred (so that indexer starts faster), from search.cgi server
+       receives word to normalize and then passes over to client (search.cgi) list
+       of normalized word forms. This allows fastest, compared to db and text modes 
+       processing of search queries (by omitting loading and sorting all the spell 
+data).
+        </para>
+        <para>
+        <function>udm_load_ispell_data</function> function in UDM_ISPELL_TYPE_SERVER 
+mode does not
+        actually load ispell data, but only defines server address. In fact, server 
+is automatically used
+        by <function>udm_find</function> function when performing search. In case of 
+errors, e.g. if spellserver 
+        is not running or invalid host indicated, there are no messages returned and 
+ispell conversion 
+        does not work.
+        </para>
+        <note>
+        This function is available in mnoGoSearch 3.1.12 or later.
+        </note>
+        </para>
+        <simpara>Example:</simpara>
+    <informalexample>
+    <programlisting role="C">
+    if (! Udm_Load_Ispell_Data($udm,UDM_ISPELL_TYPE_SERVER,'','',1)) {
+       printf("Error loading ispell data from server&lt;br&gt;\n");
+       exit;
+       }
+       </programlisting>
+       </informalexample>
         </listitem>
        </itemizedlist> 
    </refsect1>


Reply via email to