Что такое код udm_free_ispell_data

udm_free_ispell_data

(PHP 4 >= 4.0.5, PHP 5 = 1.0.0)

udm_free_ispell_data � Free memory allocated for ispell data

Description

Frees the memory allocated for ispell data.

Parameters

A link to Agent, received after call to udm_alloc_agent() .

Return Values

udm_free_ispell_data() always returns TRUE .

Notes

This function is supported beginning from version 3.1.12 of mnoGoSearch and it does not do anything in previous versions.

User Contributed Notes

in mnogosearch 3.2.33 (and earlier 3.2.x versions) this function should not be used, as udm_free_agent() implicitly frees this memory too.

as a result, you will have «double free» and crash of php/apache instance

��� ����� ��� udm_free_ispell_data

(PHP 4 >= 4.0.5, PHP 5)

udm_load_ispell_data — Load ispell data

Description bool udm_load_ispell_data ( resource agent, int var, string val1, string val2, int flag )

udm_load_ispell_data() loads ispell data. Возвращает TRUE в случае успешного завершения или FALSE в случае возникновения ошибки.

agent — agent link >udm_alloc_agent() .

var — parameter, indicating the source for ispell data. May have the following values:

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.

UDM_ISPELL_TYPE_DB — indicates that ispell data should be loaded from SQL. In this case, parameters val1 and val2 are ignored and should be left blank. flag should be equal to 1 .

Замечание: flag indicates that after loading ispell data from defined source it should be sorted (it is necessary for correct functioning of ispell). In case of loading ispell data from files there may be several calls to udm_load_ispell_data() , 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 1 . In this mode in case of error, e.g. if ispell tables are absent, the function will return FALSE and code and error message will be accessible through udm_error() and udm_errno() .

Пример 1. udm_load_ispell_data() example

UDM_ISPELL_TYPE_AFFIX — indicates that ispell data should be loaded from file and initiates loading affixes file. In this case val1 defines double letter language code for which affixes are loaded, and val2 — 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 FALSE , and an error message will be displayed. Error message text cannot be accessed through udm_error() and udm_errno() , since those functions can only return messages associated with SQL. Please, see flag parameter description in UDM_ISPELL_TYPE_DB.

Пример 2. udm_load_ispell_data() example

Замечание: flag is equal to 1 only in the last call.

UDM_ISPELL_TYPE_SPELL — indicates that ispell data should be loaded from file and initiates loading of ispell dictionary file. In this case val1 defines double letter language code for which affixes are loaded, and val2 — 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 FALSE , and an error message will be displayed. Error message text cannot be accessed through udm_error() and udm_errno() , since those functions can only return messages associated with SQL. Please, see flag parameter description in UDM_ISPELL_TYPE_DB.

Замечание: flag is equal to 1 only in the last call.

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.

udm_free_ispell_data

(PHP 4 >= 4.0.5, PHP 5 = 1.0.0)

udm_free_ispell_data � Free memory allocated for ispell data

Description

Frees the memory allocated for ispell data.

Parameters

A link to Agent, received after call to udm_alloc_agent() .

Return Values

udm_free_ispell_data() always returns TRUE .

Notes

This function is supported beginning from version 3.1.12 of mnoGoSearch and it does not do anything in previous versions.

����� �����

������� ����������� ����������� ��������� ������. ��� �� ��� � ������. ������ ������� �������� ���� ���� ����� � �� ���������� � �� ����������� �����������, � ������������ ������ � ���������������� (peopleware). ������ ������� �Constantine on Peopleware� �������� ������������ ������ � ������� �������������� ����������. ����� ����� ����� ����������� �������� ��� 52 ����������� ������ �� ���������� ����� � 25 ����� ����.

Peopleware ���������� ��� �������, ��������� � ����� ����� � ���������� ������������ �����������. ��� �������� � ��������������, ������ � ������, �������� ��������� ����������, ����������� ���������, ���������� ����������� � �������������� ����� ��������� � �����������, ���������� � �������� ��������. � ������ ������� �������� ��� ����� �������, ����������� ��������������� �������� � ��������� ����������� ���������.

�������� ��������� �� ���������� �����: The Peopleware Papers by Larry L. Constantine

udm_load_ispell_data

Load ispell data ( PHP 4 >= 4.0.5, PHP 5 )

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.

Parameters

A link to Agent, received after call to udm_alloc_agent().

Indicates the source for ispell data. May have the following values:

UDM_ISPELL_TYPE_DB — indicates that ispell data should be loaded from SQL. In this case, parameters val1 and val2 are ignored and should be left blank. flag should be equal to 1 .

Илон Маск рекомендует:  GeekBrains хватит мечтать, начинайте кодить

flag indicates that after loading ispell data from defined source it should be sorted (it is necessary for correct functioning of ispell). In case of loading ispell data from files there may be several calls to udm_load_ispell_data(), 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 1 . In this mode in case of error, e.g. if ispell tables are absent, the function will return FALSE and code and error message will be accessible through udm_error() and udm_errno().

UDM_ISPELL_TYPE_AFFIX — indicates that ispell data should be loaded from file and initiates loading affixes file. In this case val1 defines double letter language code for which affixes are loaded, and val2 — 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 FALSE , and an error message will be displayed. Error message text cannot be accessed through udm_error() and udm_errno(), since those functions can only return messages associated with SQL. Please, see flag parameter description in UDM_ISPELL_TYPE_DB.

Example 1373. udm_load_ispell_data() example

flag is equal to 1 only in the last call.

UDM_ISPELL_TYPE_SPELL — indicates that ispell data should be loaded from file and initiates loading of ispell dictionary file. In this case val1 defines double letter language code for which affixes are loaded, and val2 — 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 FALSE , and an error message will be displayed. Error message text cannot be accessed through udm_error() and udm_errno(), since those functions can only return messages associated with SQL. Please, see flag parameter description in UDM_ISPELL_TYPE_DB.

flag is equal to 1 only in the last call.

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.

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.

Return Values

Returns TRUE on success or FALSE on failure.

udm_load_ispell_data

(PHP 4 >= 4.0.5, PHP 5 udm_load_ispell_data � Load ispell data

Description

udm_load_ispell_data() loads ispell data.

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.

Parameters

A link to Agent, received after call to udm_alloc_agent().

Indicates the source for ispell data. May have the following values:

    UDM_ISPELL_TYPE_DB — indicates that ispell data should be loaded from SQL. In this case, parameters val1 and val2 are ignored and should be left blank. flag should be equal to 1.

Note: flag indicates that after loading ispell data from defined source it should be sorted (it is necessary for correct functioning of ispell). In case of loading ispell data from files there may be several calls to udm_load_ispell_data(), 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 1. In this mode in case of error, e.g. if ispell tables are absent, the function will return FALSE and code and error message will be accessible through udm_error() and udm_errno().

UDM_ISPELL_TYPE_AFFIX — indicates that ispell data should be loaded from file and initiates loading affixes file. In this case val1 defines double letter language code for which affixes are loaded, and val2 — 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 FALSE, and an error message will be displayed. Error message text cannot be accessed through udm_error() and udm_errno(), since those functions can only return messages associated with SQL. Please, see flag parameter description in UDM_ISPELL_TYPE_DB.

Example #1 udm_load_ispell_data() example

UDM_ISPELL_TYPE_SPELL — indicates that ispell data should be loaded from file and initiates loading of ispell dictionary file. In this case val1 defines double letter language code for which affixes are loaded, and val2 — 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 FALSE, and an error message will be displayed. Error message text cannot be accessed through udm_error() and udm_errno(), since those functions can only return messages associated with SQL. Please, see flag parameter description in UDM_ISPELL_TYPE_DB.

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).

Илон Маск рекомендует:  Функции curl, client url library

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.

Note: This function is available in mnoGoSearch 3.1.12 or later.

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.

Return Values

Returns TRUE on success or FALSE on failure.

��� ����� ��� udm_free_ispell_data

(PHP 4 >= 4.0.5, PHP 5

Description bool udm_load_ispell_data ( resource agent, int var, string val1, string val2, int flag )

udm_load_ispell_data() loads ispell data. Returns TRUE on success or FALSE on failure.

agent — agent link >udm_alloc_agent() .

var — parameter, indicating the source for ispell data. May have the following values:

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.

UDM_ISPELL_TYPE_DB — indicates that ispell data should be loaded from SQL. In this case, parameters val1 and val2 are ignored and should be left blank. flag should be equal to 1 .

Note: flag indicates that after loading ispell data from defined source it should be sorted (it is necessary for correct functioning of ispell). In case of loading ispell data from files there may be several calls to udm_load_ispell_data() , 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 1 . In this mode in case of error, e.g. if ispell tables are absent, the function will return FALSE and code and error message will be accessible through udm_error() and udm_errno() .

Example 1. udm_load_ispell_data() example

if (! udm_load_ispell_data ( $udm , UDM_ISPELL_TYPE_DB , » , » , 1 )) <
printf ( «Error #%d: ‘%s’\n» , udm_errno ( $udm ), udm_error ( $udm ));
exit;
>
?>

UDM_ISPELL_TYPE_AFFIX — indicates that ispell data should be loaded from file and initiates loading affixes file. In this case val1 defines double letter language code for which affixes are loaded, and val2 — 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 FALSE , and an error message will be displayed. Error message text cannot be accessed through udm_error() and udm_errno() , since those functions can only return messages associated with SQL. Please, see flag parameter description in UDM_ISPELL_TYPE_DB.

Example 2. udm_load_ispell_data() example

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;
>
?>

Note: flag is equal to 1 only in the last call.

UDM_ISPELL_TYPE_SPELL — indicates that ispell data should be loaded from file and initiates loading of ispell dictionary file. In this case val1 defines double letter language code for which affixes are loaded, and val2 — 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 FALSE , and an error message will be displayed. Error message text cannot be accessed through udm_error() and udm_errno() , since those functions can only return messages associated with SQL. Please, see flag parameter description in UDM_ISPELL_TYPE_DB.

Note: flag is equal to 1 only in the last call.

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.

Note: This function is available in mnoGoSearch 3.1.12 or later.

PHP � PYTHON

PYTHON udm_free_ispell_data

Do you know a Python replacement for PHP’s udm_free_ispell_data ? Write it!

PHP udm_free_ispell_data

udm_free_ispell_data

(PHP 4 >= 4.0.5, PHP 5 = 1.0.0)

udm_free_ispell_data � Free memory allocated for ispell data

Description

Frees the memory allocated for ispell data.

Parameters

A link to Agent, received after call to udm_alloc_agent().

Return Values

udm_free_ispell_data() always returns TRUE.

Notes

Note: This function is supported beginning from version 3.1.12 of mnoGoSearch and it does not do anything in previous versions.

��� ����� ��� udm_free_ispell_data

udm_load_ispell_data — Load ispell data

Description

int udm_load_ispell_data (int agent, int var, string val1, string val2, int flag)

udm_load_ispell_data() loads ispell data. Returns TRUE on success, FALSE on error.

agent — agent link >udm_alloc_agent() .

var — parameter, indicating the source for ispell data. May have the following values:

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.

UDM_ISPELL_TYPE_DB — indicates that ispell data should be loaded from SQL. In this case, parameters val1 and val2 are ignored and should be left blank. flag should be equal to 1 .

Note: flag 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 udm_load_ispell_data() , 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 1 . In this mode in case of error, e.g. if ispell tables are absent, the function will return FALSE and code and error message will be accessible through udm_error() and udm_errno() .

UDM_ISPELL_TYPE_AFFIX — indicates that ispell data should be loaded from file and initiates loading affixes file. In this case val1 defines double letter language code for which affixes are loaded, and val2 — 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 FALSE , and an error message will be displayed. Error message text cannot be accessed through udm_error() and udm_errno() , since those functions can only return messages associated with SQL. Please, see flag parameter description in UDM_ISPELL_TYPE_DB.

Илон Маск рекомендует:  Что такое код msql_fieldflags

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)))

Note: flag is equal to 1 only in the last call.

UDM_ISPELL_TYPE_SPELL — indicates that ispell data should be loaded from file and initiates loading of ispell dictionary file. In this case val1 defines double letter language code for which affixes are loaded, and val2 — 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 FALSE , and an error message will be displayed. Error message text cannot be accessed through udm_error() and udm_errno() , since those functions can only return messages associated with SQL. Please, see flag parameter description in UDM_ISPELL_TYPE_DB.

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)))

Note: flag is equal to 1 only in the last call.

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.

Note: This function is available in mnoGoSearch 3.1.12 or later.

udm_load_ispell_data

(PHP 4 >= 4.0.5, PHP 5 = 1.0.0)

udm_load_ispell_data � ��������� ispell-������

��������

udm_load_ispell_data() ��������� ispell-������.

����� ������������� ���� �������, ��� ����, ����� ���������� ������, ���������� ��� ispell-������, ����������, ����������� ������� udm_free_ispell_data() , ���� ���� �� ����������� ����� UDM_ISPELL_TYPE_SERVER .

������ ����������

������ �� ������������� ������, ���������� ����� ������ udm_alloc_agent() .

��������� �������� ispell-������. ����� ��������� ��������� ��������:

    UDM_ISPELL_TYPE_DB — ���������, ��� ispell-������ ������ ���� ��������� �� SQL. � ���� ������ ��������� val1 � val2 ������������ � ������ ���� �������. flag ������ ���� ����� 1.

flag ���������, ��� ����� �������� ispell-������ �� ������������ ������� ��� ������ ���� ������������� (��� ���������� ��� ���������� ������ ispell). � ������ �������� ispell-������ �� ������ ����� ���� ��������� ������� ������� udm_load_ispell_data() , ��� ��� ��� ������ ����������� ������ ����� ������� ������, ����� ����������. ��������� � ������ db ��� ������ ����������� ����� �������, ���� �������� ������ ����� �������� 1. � ���� ������, � ������ ������, ��������, ���� ispell-������� �����������, ������� ��������� FALSE , � ��� � ��������� �� ������ ����� �������� ����� udm_error() � udm_errno() .

UDM_ISPELL_TYPE_AFFIX — ���������, ��� ispell-������ ������ ���� ��������� �� �����, � ���������� �������� ����� ��������. � ���� ������ val1 ���������� ������������� ��� �����, ��� �������� ����������� �������, � val2 — ���� � �����. ����������, �������� ��������, ���, ���� ����� ������������� ����, ������ ���� ���� �� � UDM_CONF_DIR , � ������������ �������� ����, �.�. ����, � ������� ����������� ������. � ������ ������ � ���� ������, ��������, ���� ���� �����������, ������� ��������� FALSE , � ����� �������� ��������� �� ������. ����� ��������� �� ������ �� ����� ���� ������� ����� udm_error() � udm_errno() , ��� ��� ��� ������� ����� ���������� ������ ���������, ��������� � SQL. ����������, ���������� �������� ��������� flag � UDM_ISPELL_TYPE_DB .

������ #1 ������ ������������� udm_load_ispell_data()

flag ����� 1 ������ � ��������� ������.

UDM_ISPELL_TYPE_SPELL — ���������, ��� ispell-������ ������ ���� ��������� �� �����, � ���������� �������� ����� ispell-�������. � ���� ������ val1 ���������� ������������� ��� �����, ��� �������� ����������� �������, � val2 — ���� � �����. ����������, �������� ��������, ���, ���� ����� ������������� ����, ������ ���� ���� �� � UDM_CONF_DIR , � ������������ �������� ����, �.�. ����, � ������� ����������� ������. � ������ ������ � ���� ������, ��������, ���� ���� �����������, ������� ��������� FALSE , � ����� �������� ��������� �� ������. ����� ��������� �� ������ �� ����� ���� ������� ����� udm_error() � udm_errno() , ��� ��� ��� ������� ����� ���������� ������ ���������, ��������� � SQL. ����������, ���������� �������� ��������� flag � UDM_ISPELL_TYPE_DB .

flag ����� 1 ������ � ��������� ������.

UDM_ISPELL_TYPE_SERVER — �������� ��������� spell-�������. �������� val1 ��������� ����� ����� ����������� spell-�������. val2 ��� �� ������������, �� � ������� ������� �� ����� ��������� ����� �����, ������������� spell-��������. �������� flag � ���� ������ �� �����, ��� ��� ispell-������ �������� �� spell-������� ��� ����������������.

Spelld-������ ������ spell-������ �� ���������� ����� ������������ (�� ��������� /usr/local/mnogosearch/etc/spelld.conf), ��������� �� � ��������� � ������. � ��������� ������ ��������������� � ������� ���������������� �������: ��� ������ ���������� � ���������� (��� ��� ���������� �������� �������), �� search.cgi ������ �������� ����� ��� ������������ � ����� ������� ������� (search.cgi) ������ ��������������� ���������. ��� ������������ ����� �������, �� ��������� � �������� db � text ��������� ��������� �������� (����� �������� � ���������� ���� spell-������).

������� udm_load_ispell_data() � ������ UDM_ISPELL_TYPE_SERVER �� ����� ���� �� ��������� ispell-������, � ������ ���������� ����� �������. ����������, ������ ������������� ������������ �������� udm_find() ��� ���������� ������. � ������ ������, ��������, ���� spell-������ �� ������� ��� ������ ������������ ����, ������������ ��������� ��� � ����������� ispell �� ��������.

��� ������� �������� � mnoGoSearch 3.1.12 ��� ����.

����� ������� ������� �������� UDM_ISPELL_TYPE_SERVER . UDM_ISPELL_TYPE_TEXT ��������� � UDM_ISPELL_TYPE_DB ����� ���������. ������������� ����� ��� mnoGoSearch 3.1.10 — 3.1.11. ����������� �������� ����� DB � ������� �������, � �� ����� ������� ������ TEXT.

������������ ��������

���������� TRUE � ������ ��������� ���������� ��� FALSE � ������ ������������� ������.

�������

������ #2 ������ ������������� udm_load_ispell_data()

Понравилась статья? Поделиться с друзьями:
Кодинг, CSS и SQL