mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 17:08:54 +00:00
Added server ispell mode
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@42542 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
36faf2f3d6
commit
630ad2ba69
1 changed files with 45 additions and 4 deletions
|
@ -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>
|
||||
<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>
|
||||
</note>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
|
@ -726,6 +729,44 @@
|
|||
</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<br>\n");
|
||||
exit;
|
||||
}
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
Loading…
Reference in a new issue