mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-18 05:26:57 +08:00
112 lines
4.5 KiB
HTML
112 lines
4.5 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
|
<title>Allocate mnoGoSearch session</title>
|
|
</head>
|
|
<body class="docs"><div id="layout">
|
|
<div id="layout-content"><div id="function.udm-alloc-agent" class="refentry">
|
|
<div class="refnamediv">
|
|
<h1 class="refname">udm_alloc_agent</h1>
|
|
<p class="verinfo">(PHP 4 >= 4.0.5, PHP 5 < 5.1.0, PECL mnogosearch >= 1.0.0)</p><p class="refpurpose"><span class="refname">udm_alloc_agent</span> — <span class="dc-title">Allocate mnoGoSearch session</span></p>
|
|
|
|
</div>
|
|
|
|
<div class="refsect1 description" id="refsect1-function.udm-alloc-agent-description">
|
|
<h3 class="title">说明</h3>
|
|
<div class="methodsynopsis dc-description">
|
|
<span class="methodname"><strong>udm_alloc_agent</strong></span>
|
|
( <span class="methodparam"><span class="type">string</span> <code class="parameter">$dbaddr</code></span>
|
|
[, <span class="methodparam"><span class="type">string</span> <code class="parameter">$dbmode</code></span>
|
|
] ) : <span class="type">resource</span></div>
|
|
|
|
<p class="para rdfs-comment">
|
|
Allocate a mnoGoSearch session.
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 parameters" id="refsect1-function.udm-alloc-agent-parameters">
|
|
<h3 class="title">参数</h3>
|
|
<p class="para">
|
|
<dl>
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">dbaddr</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
<code class="parameter">dbaddr</code> - URL-style database description, with
|
|
options (type, host, database name, port, user and password) to connect
|
|
to SQL database. Do not matter for built-in text files support. Format for
|
|
<code class="parameter">dbaddr</code>:
|
|
<em>DBType:[//[DBUser[:DBPass]@]DBHost[:DBPort]]/DBName/</em>.
|
|
Currently supported DBType values are: mysql, pgsql, msql, solid, mssql, oracle,
|
|
and ibase. Actually, it does not matter for native libraries support, but
|
|
ODBC users should specify one of the supported values. If your database
|
|
type is not supported, you may use <em>unknown</em> instead.
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<code class="parameter">dbmode</code></dt>
|
|
|
|
<dd>
|
|
|
|
<p class="para">
|
|
<code class="parameter">dbmode</code> - You may select the SQL database mode of
|
|
words storage. Possible values of <code class="parameter">dbmode</code> are:
|
|
<em>single</em>, <em>multi</em>, <em>crc</em>,
|
|
or <em>crc-multi</em>. When <em>single</em> is
|
|
specified, all words are stored in the same table. If <em>multi
|
|
</em> is selected, words will be located in different tables depending
|
|
of their lengths. "multi" mode is usually faster, but requires more tables
|
|
in the database. If "crc" mode is selected, mnoGoSearch will store 32 bit
|
|
integer word IDs calculated by CRC32 algorithm instead of words. This mode
|
|
requires less disk space and it is faster comparing with "single" and
|
|
"multi" modes. <em>crc-multi</em> uses the same storage structure
|
|
with the "crc" mode, but also stores words in different tables depending on
|
|
words lengths like in "multi" mode.
|
|
</p>
|
|
</dd>
|
|
|
|
|
|
</dl>
|
|
|
|
</p>
|
|
<blockquote class="note"><p><strong class="note">Note</strong>:
|
|
<p class="para">
|
|
<code class="parameter">dbaddr</code> and <code class="parameter">dbmode</code> must match
|
|
those used during indexing.
|
|
</p>
|
|
</p></blockquote>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 returnvalues" id="refsect1-function.udm-alloc-agent-returnvalues">
|
|
<h3 class="title">返回值</h3>
|
|
<p class="para">
|
|
Returns a mnogosearch agent identifier on success, <strong><code>FALSE</code></strong> on failure. This
|
|
function creates a session with database parameters.
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 notes" id="refsect1-function.udm-alloc-agent-notes">
|
|
<h3 class="title">注释</h3>
|
|
<blockquote class="note"><p><strong class="note">Note</strong>:
|
|
<p class="para">
|
|
In fact this function does not open a connection to the database and
|
|
thus does not check the entered login and password. Establishing a
|
|
connection to the database and login/password verification is done by
|
|
<span class="function"><a href="udm_find.html" class="function">udm_find()</a></span>.
|
|
</p>
|
|
</p></blockquote>
|
|
</div>
|
|
|
|
|
|
</div></div></div></body></html> |