diff --git a/functions/mnogosearch.xml b/functions/mnogosearch.xml index 203497191b..99fa646383 100644 --- a/functions/mnogosearch.xml +++ b/functions/mnogosearch.xml @@ -642,12 +642,15 @@ var - parameter, indicating the source for ispell data. May have the following values: - - 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 + udm_free_ispell_data, even if you use UDM_ISPELL_TYPE_SERVER mode. + + + 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. - @@ -726,6 +729,44 @@ + + + UDM_ISPELL_TYPE_SERVER - enables spell server support. val1 parameter indicates + address of the host running spell server. val2 is not used yet, but + in future releases it is going to indicate number of port used by spell server. + flag parameter in this case is not needed since ispell data is stored + on spellserver already sorted. + + + 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). + + + udm_load_ispell_data 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 udm_find 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. + + + This function is available in mnoGoSearch 3.1.12 or later. + + + Example: + + + if (! Udm_Load_Ispell_Data($udm,UDM_ISPELL_TYPE_SERVER,'','',1)) { + printf("Error loading ispell data from server<br>\n"); + exit; + } + + +