mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-27 14:28:56 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@137537 c90b9560-bf6c-de11-be94-00142212c4b1
256 lines
9.8 KiB
XML
256 lines
9.8 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.4 $ -->
|
|
<!-- splitted from ./en/functions/mnogosearch.xml, last change in rev 1.18 -->
|
|
<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>
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>udm_set_agent_param</methodname>
|
|
<methodparam><type>resource</type><parameter>agent</parameter></methodparam>
|
|
<methodparam><type>int</type><parameter>var</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>val</parameter></methodparam>
|
|
</methodsynopsis>
|
|
|
|
<para>
|
|
&return.success; 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 built-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>
|
|
<literallayout>
|
|
URLWeight 1
|
|
BodyWeight 2
|
|
TitleWeight 4
|
|
KeywordWeight 8
|
|
DescWeight 16
|
|
</literallayout>
|
|
|
|
<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>
|
|
<literallayout>
|
|
E is a factor for weight 1 (URL Weight bit)
|
|
D is a factor for weight 2 (BodyWeight bit)
|
|
C is a factor for weight 4 (TitleWeight bit)
|
|
B is a factor for weight 8 (KeywordWeight bit)
|
|
A is a factor for weight 16 (DescWeight bit)
|
|
</literallayout>
|
|
<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,Description
|
|
but not through URL and Body.
|
|
</simpara>
|
|
<simpara>
|
|
UDM_PARAM_WEIGHT_FACTOR=F9421 will search through:
|
|
</simpara>
|
|
<literallayout>
|
|
Description with factor 15 (F hex)
|
|
Keywords with factor 9
|
|
Title with factor 4
|
|
Body with factor 2
|
|
URL with factor 1
|
|
</literallayout>
|
|
<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 parameter 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>
|
|
<listitem>
|
|
<simpara>
|
|
UDM_PARAM_CROSS_WORDS - enables or disables crosswords support.
|
|
Possible values: UDM_CROSS_WORDS_ENABLED and UDM_CROSS_WORDS_DISABLED.
|
|
</simpara>
|
|
<simpara>
|
|
The corsswords feature allows to assign words between <a href="xxx"> and </a>
|
|
also to a document this link leads to. It works in SQL database mode and
|
|
is not supported in built-in database and Cachemode.
|
|
</simpara>
|
|
<note>
|
|
<simpara>
|
|
Crosswords are supported only in mnoGoSearch 3.1.11 or later.
|
|
</simpara>
|
|
</note>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
UDM_PARAM_VARDIR - specifies a custom path to directory where indexer
|
|
stores data when using built-in database and in cache mode.
|
|
By default <literal>/var</literal> directory of
|
|
mnoGoSearch installation is used. Can have
|
|
only string values. The parameter is available in PHP 4.1.0 or later.
|
|
</simpara>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- 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
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|