[Xunsearch PHP-SDK](http://www.xunsearch.com) v1.4.8 API 參考文檔
# XSServer
[All Packages](#)| [屬性](#)| [方法(函數)](#)
| 包 | [XS](#) |
|-----|-----|
| 繼承關系 | class XSServer ?[XSComponent](#) |
| 子類 | [XSIndex](#), [XSSearch](#) |
| 版本 | 1.0.0 |
| 源代碼 | [sdk/php/lib/XSServer.class.php](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XSServer.class.php) |
XSServer 服務器操作對象同時兼容于 indexd, searchd, 所有交互均采用 [XSCommand](#) 對象
### Public 屬性
[隱去繼承來的屬性](#)
| 名稱 | 類型 | 描述 | 定義于 |
|-----|-----|-----|-----|
| [connString](#) | string | 連接字符串 | XSServer |
| [project](#) | string | 獲取當前項目名稱 | XSServer |
| [respond](#) | [XSCommand](#) | 從服務器讀取響應指令 | XSServer |
| [socket](#) | mixed | 獲取連接資源描述符 | XSServer |
| [xs](#) | [XS](#) | 服務端關聯的 XS 對象 | XSServer |
### Protected 屬性
[隱去繼承來的屬性](#)
| 名稱 | 類型 | 描述 | 定義于 |
|-----|-----|-----|-----|
| [_conn](#) | | | XSServer |
| [_flag](#) | | | XSServer |
| [_project](#) | | | XSServer |
| [_sendBuffer](#) | | | XSServer |
| [_sock](#) | | | XSServer |
### Public 方法
[隱去繼承來的方法](#)
| 名稱 | 描述 | 定義于 |
|-----|-----|-----|
| [__construct()](#) | 構造函數, 打開連接 | XSServer |
| [__destruct()](#) | 析構函數, 關閉連接 | XSServer |
| [__get()](#) | 魔術方法 __get | [XSComponent](#) |
| [__isset()](#) | 魔術方法 __isset | [XSComponent](#) |
| [__set()](#) | 魔術方法 __set | [XSComponent](#) |
| [__unset()](#) | 魔術方法 __unset | [XSComponent](#) |
| [close()](#) | 關閉連接 | XSServer |
| [execCommand()](#) | 執行服務端指令并獲取返回值 | XSServer |
| [getConnString()](#) | Returns 連接字符串 | XSServer |
| [getProject()](#) | 獲取當前項目名稱 | XSServer |
| [getRespond()](#) | 從服務器讀取響應指令 | XSServer |
| [getSocket()](#) | 獲取連接資源描述符 | XSServer |
| [hasRespond()](#) | 判斷服務端是否有可讀數據 | XSServer |
| [open()](#) | 打開服務端連接 | XSServer |
| [reopen()](#) | 重新打開連接 | XSServer |
| [sendCommand()](#) | 往服務器直接發送指令 (無緩存) | XSServer |
| [setProject()](#) | 設置當前項目 | XSServer |
| [setTimeout()](#) | 設置服務端超時秒數 | XSServer |
### Protected 方法
[隱去繼承來的方法](#)
| 名稱 | 描述 | 定義于 |
|-----|-----|-----|
| [check()](#) | 檢測服務端的連接情況 | XSServer |
| [connect()](#) | 連接服務端 | XSServer |
| [read()](#) | 讀取數據 | XSServer |
| [write()](#) | 寫入數據 | XSServer |
### 屬性明細
_conn屬性
protected **$_conn**;
_flag屬性
protected **$_flag**;
_project屬性
protected **$_project**;
_sendBuffer屬性
protected **$_sendBuffer**;
_sock屬性
protected **$_sock**;
connString屬性 *只讀*
public string [**getConnString**](#)()
連接字符串
project屬性
public string [**getProject**](#)()
public void [**setProject**](#)(string $name, string $home='')
獲取當前項目名稱
respond屬性 *只讀*
public [XSCommand](#)[**getRespond**](#)()
從服務器讀取響應指令
socket屬性 *只讀*
public mixed [**getSocket**](#)()
獲取連接資源描述符
xs屬性
public [XS](#)**$xs**;
服務端關聯的 XS 對象
### 方法明細
__construct()方法
<table class="summaryTable"><tr><td colspan="3"><div class="signature2">public void <b>__construct</b>(string $conn=NULL, <a href="XS.html">XS</a> $xs=NULL)</div></td></tr><tr><td class="paramNameCol">$conn</td> <td class="paramTypeCol">string</td> <td class="paramDescCol">服務端連接參數</td></tr><tr><td class="paramNameCol">$xs</td> <td class="paramTypeCol"><a href="XS.html">XS</a></td> <td class="paramDescCol">需要捆綁的 xs 對象</td></tr></table>
**源碼:**[sdk/php/lib/XSServer.class.php#L143](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XSServer.class.php#L143) (**[顯示](#)**)
`public?function?__construct($conn?=?null,?$xs?=?null)
{
????$this->xs?=?$xs;
????if?($conn?!==?null)?{
????????$this->open($conn);
????}
}`
構造函數, 打開連接
__destruct()方法
<table class="summaryTable"><tr><td colspan="3"><div class="signature2">public void <b>__destruct</b>()</div></td></tr></table>
**源碼:**[sdk/php/lib/XSServer.class.php#L154](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XSServer.class.php#L154) (**[顯示](#)**)
`public?function?__destruct()
{
????$this->xs?=?null;
????$this->close();
}`
析構函數, 關閉連接
check()方法
<table class="summaryTable"><tr><td colspan="3"><div class="signature2">protected void <b>check</b>()</div></td></tr></table>
**源碼:**[sdk/php/lib/XSServer.class.php#L438](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XSServer.class.php#L438) (**[顯示](#)**)
`protected?function?check()
{
????if?($this->_sock?===?null)?{
????????throw?new?XSException('No?server?connection');
????}
????if?($this->_flag?&?self::BROKEN)?{
????????throw?new?XSException('Broken?server?connection');
????}
}`
檢測服務端的連接情況
close()方法
<table class="summaryTable"><tr><td colspan="3"><div class="signature2">public void <b>close</b>(bool $ioerr=false)</div></td></tr><tr><td class="paramNameCol">$ioerr</td> <td class="paramTypeCol">bool</td> <td class="paramDescCol">關閉調用是否由于 IO 錯誤引起的, 以免發送 quit 指令</td></tr></table>
**源碼:**[sdk/php/lib/XSServer.class.php#L198](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XSServer.class.php#L198) (**[顯示](#)**)
`public?function?close($ioerr?=?false)
{
????if?($this->_sock?&&?!($this->_flag?&?self::BROKEN))?{
????????if?(!$ioerr?&&?$this->_sendBuffer?!==?'')?{
????????????$this->write($this->_sendBuffer);
????????????$this->_sendBuffer?=?'';
????????}
????????if?(!$ioerr?&&?!($this->_flag?&?self::FILE))?{
????????????$cmd?=?new?XSCommand(CMD_QUIT);
????????????fwrite($this->_sock,?$cmd);
????????}
????????fclose($this->_sock);
????????$this->_flag?|=?self::BROKEN;
????}
}`
關閉連接附帶發送發送 quit 命令
connect()方法
<table class="summaryTable"><tr><td colspan="3"><div class="signature2">protected void <b>connect</b>()</div></td></tr></table>
**源碼:**[sdk/php/lib/XSServer.class.php#L452](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XSServer.class.php#L452) (**[顯示](#)**)
`protected?function?connect()
{
????//?connect?to?server
????$conn?=?$this->_conn;
????if?(is_int($conn)?||?is_numeric($conn))?{
????????$host?=?'localhost';
????????$port?=?intval($conn);
????}?elseif?(!strncmp($conn,?'file://',?7))?{
????????//?write-only?for?saving?index?exchangable?data?to?file
????????//?NOTE:?this?will?cause?file?content?be?turncated
????????$conn?=?substr($conn,?7);
????????if?(($sock?=?@fopen($conn,?'wb'))?===?false)?{
????????????throw?new?XSException('Failed?to?open?local?file?for?writing:?`'?.?$conn?.?'\'');
????????}
????????$this->_flag?|=?self::FILE;
????????$this->_sock?=?$sock;
????????return;
????}?elseif?(($pos?=?strpos($conn,?':'))?!==?false)?{
????????$host?=?substr($conn,?0,?$pos);
????????$port?=?intval(substr($conn,?$pos?+?1));
????}?else?{
????????$host?=?'unix://'?.?$conn;
????????$port?=?-1;
????}
????if?(($sock?=?@fsockopen($host,?$port,?$errno,?$error,?5))?===?false)?{
????????throw?new?XSException($error?.?'(C#'?.?$errno?.?',?'?.?$host?.?':'?.?$port?.?')');
????}
????//?set?socket?options
????$timeout?=?ini_get('max_execution_time');
????$timeout?=?$timeout?>?0???($timeout?-?1)?:?30;
????stream_set_blocking($sock,?true);
????stream_set_timeout($sock,?$timeout);
????$this->_sock?=?$sock;
}`
連接服務端
execCommand()方法
<table class="summaryTable"><tr><td colspan="3"><div class="signature2">public mixed <b>execCommand</b>(mixed $cmd, int $res_arg=0, int $res_cmd=128)</div></td></tr><tr><td class="paramNameCol">$cmd</td> <td class="paramTypeCol">mixed</td> <td class="paramDescCol">要提交的指令, 若不是 XSCommand 實例則作為構造函數的第一參數創建對象</td></tr><tr><td class="paramNameCol">$res_arg</td> <td class="paramTypeCol">int</td> <td class="paramDescCol">要求的響應參數, 默認為 CMD_NONE 即不檢測, 若檢測結果不符 則認為命令調用失敗, 會返回 false 并設置相應的出錯信息</td></tr><tr><td class="paramNameCol">$res_cmd</td> <td class="paramTypeCol">int</td> <td class="paramDescCol">要求的響應指令, 默認為 CMD_OK 即要求結果必須正確.</td></tr><tr><td class="paramNameCol">{return}</td> <td class="paramTypeCol">mixed</td> <td class="paramDescCol">若無需要檢測結果則返回 true, 其它返回響應的 XSCommand 對象</td></tr></table>
**源碼:**[sdk/php/lib/XSServer.class.php#L279](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XSServer.class.php#L279) (**[顯示](#)**)
`public?function?execCommand($cmd,?$res_arg?=?CMD_NONE,?$res_cmd?=?CMD_OK)
{
????//?create?command?object
????if?(!$cmd?instanceof?XSCommand)?{
????????$cmd?=?new?XSCommand($cmd);
????}
????//?just?cache?the?cmd?for?those?need?not?answer
????if?($cmd->cmd?&?0x80)?{
????????$this->_sendBuffer?.=?$cmd;
????????return?true;
????}
????//?send?cmd?to?server
????$buf?=?$this->_sendBuffer?.?$cmd;
????$this->_sendBuffer?=?'';
????$this->write($buf);
????//?return?true?directly?for?local?file
????if?($this->_flag?&?self::FILE)?{
????????return?true;
????}
????//?got?the?respond
????$res?=?$this->getRespond();
????//?check?respond
????if?($res->cmd?===?CMD_ERR?&&?$res_cmd?!=?CMD_ERR)?{
????????throw?new?XSException($res->buf,?$res->arg);
????}
????//?got?unexpected?respond?command
????if?($res->cmd?!=?$res_cmd?||?($res_arg?!=?CMD_NONE?&&?$res->arg?!=?$res_arg))?{
????????throw?new?XSException('Unexpected?respond?{CMD:'?.?$res->cmd?.?',?ARG:'?.?$res->arg?.?'}');
????}
????return?$res;
}`
執行服務端指令并獲取返回值
getConnString()方法
<table class="summaryTable"><tr><td colspan="3"><div class="signature2">public string <b>getConnString</b>()</div></td></tr><tr><td class="paramNameCol">{return}</td> <td class="paramTypeCol">string</td> <td class="paramDescCol">連接字符串</td></tr></table>
**源碼:**[sdk/php/lib/XSServer.class.php#L217](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XSServer.class.php#L217) (**[顯示](#)**)
`public?function?getConnString()
{
????$str?=?$this->_conn;
????if?(is_int($str)?||?is_numeric($str))?{
????????$str?=?'localhost:'?.?$str;
????}?elseif?(strpos($str,?':')?===?false)?{
????????$str?=?'unix://'?.?$str;
????}
????return?$str;
}`
getProject()方法
<table class="summaryTable"><tr><td colspan="3"><div class="signature2">public string <b>getProject</b>()</div></td></tr><tr><td class="paramNameCol">{return}</td> <td class="paramTypeCol">string</td> <td class="paramDescCol">項目名稱</td></tr></table>
**源碼:**[sdk/php/lib/XSServer.class.php#L241](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XSServer.class.php#L241) (**[顯示](#)**)
`public?function?getProject()
{
????return?$this->_project;
}`
獲取當前項目名稱
getRespond()方法
<table class="summaryTable"><tr><td colspan="3"><div class="signature2">public <a href="XSCommand.html">XSCommand</a> <b>getRespond</b>()</div></td></tr><tr><td class="paramNameCol">{return}</td> <td class="paramTypeCol"><a href="XSCommand.html">XSCommand</a></td> <td class="paramDescCol">成功返回響應指令</td></tr></table>
**源碼:**[sdk/php/lib/XSServer.class.php#L334](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XSServer.class.php#L334) (**[顯示](#)**)
`public?function?getRespond()
{
????//?read?data?from?server
????$buf?=?$this->read(8);
????$hdr?=?unpack('Ccmd/Carg1/Carg2/Cblen1/Iblen',?$buf);
????$res?=?new?XSCommand($hdr);
????$res->buf?=?$this->read($hdr['blen']);
????$res->buf1?=?$this->read($hdr['blen1']);
????return?$res;
}`
從服務器讀取響應指令
getSocket()方法
<table class="summaryTable"><tr><td colspan="3"><div class="signature2">public mixed <b>getSocket</b>()</div></td></tr><tr><td class="paramNameCol">{return}</td> <td class="paramTypeCol">mixed</td> <td class="paramDescCol">連接標識, 僅用于內部測試等目的</td></tr></table>
**源碼:**[sdk/php/lib/XSServer.class.php#L232](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XSServer.class.php#L232) (**[顯示](#)**)
`public?function?getSocket()
{
????return?$this->_sock;
}`
獲取連接資源描述符
hasRespond()方法
<table class="summaryTable"><tr><td colspan="3"><div class="signature2">public bool <b>hasRespond</b>()</div></td></tr><tr><td class="paramNameCol">{return}</td> <td class="paramTypeCol">bool</td> <td class="paramDescCol">如果有返回 true, 否則返回 false</td></tr></table>
**源碼:**[sdk/php/lib/XSServer.class.php#L350](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XSServer.class.php#L350) (**[顯示](#)**)
`public?function?hasRespond()
{
????//?check?socket
????if?($this->_sock?===?null?||?$this->_flag?&?(self::BROKEN?|?self::FILE))?{
????????return?false;
????}
????$wfds?=?$xfds?=?array();
????$rfds?=?array($this->_sock);
????$res?=?stream_select($rfds,?$wfds,?$xfds,?0,?0);
????return?$res?>?0;
}`
判斷服務端是否有可讀數據用于某些特別情況在 [getRespond](#) 前先調用和判斷, 以免阻塞
open()方法
<table class="summaryTable"><tr><td colspan="3"><div class="signature2">public void <b>open</b>(mixed $conn)</div></td></tr><tr><td class="paramNameCol">$conn</td> <td class="paramTypeCol">mixed</td> <td class="paramDescCol">服務端連接參數, 支持: <端口號|host:port|本地套接字路徑></td></tr></table>
**源碼:**[sdk/php/lib/XSServer.class.php#L165](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XSServer.class.php#L165) (**[顯示](#)**)
`public?function?open($conn)
{
????$this->close();
????$this->_conn?=?$conn;
????$this->_flag?=?self::BROKEN;
????$this->_sendBuffer?=?'';
????$this->_project?=?null;
????$this->connect();
????$this->_flag?^=?self::BROKEN;
????if?($this->xs?instanceof?XS)?{
????????$this->setProject($this->xs->getName());
????}
}`
打開服務端連接如果已關聯 XS 對象, 則會同時切換至相應的項目名稱
read()方法
<table class="summaryTable"><tr><td colspan="3"><div class="signature2">protected string <b>read</b>(int $len)</div></td></tr><tr><td class="paramNameCol">$len</td> <td class="paramTypeCol">int</td> <td class="paramDescCol">要讀入的長度</td></tr><tr><td class="paramNameCol">{return}</td> <td class="paramTypeCol">string</td> <td class="paramDescCol">成功時返回讀到的字符串</td></tr></table>
**源碼:**[sdk/php/lib/XSServer.class.php#L404](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XSServer.class.php#L404) (**[顯示](#)**)
`protected?function?read($len)
{
????//?quick?return?for?zero?size
????if?($len?==?0)?{
????????return?'';
????}
????//?loop?to?send?data
????$this->check();
????for?($buf?=?'',?$size?=?$len;;)?{
????????$bytes?=?fread($this->_sock,?$len);
????????if?($bytes?===?false?||?strlen($bytes)?==?0)?{
????????????break;
????????}
????????$len?-=?strlen($bytes);
????????$buf?.=?$bytes;
????????if?($len?===?0)?{
????????????return?$buf;
????????}
????}
????//?error?occured
????$meta?=?stream_get_meta_data($this->_sock);
????$this->close(true);
????$reason?=?$meta['timed_out']???'timeout'?:?($meta['eof']???'closed'?:?'unknown');
????$msg?=?'Failed?to?recv?the?data?from?server?completely?';
????$msg?.=?'(SIZE:'?.?($size?-?$len)?.?'/'?.?$size?.?',?REASON:'?.?$reason?.?')';
????throw?new?XSException($msg);
}`
讀取數據
reopen()方法
<table class="summaryTable"><tr><td colspan="3"><div class="signature2">public XSServer <b>reopen</b>(bool $force=false)</div></td></tr><tr><td class="paramNameCol">$force</td> <td class="paramTypeCol">bool</td> <td class="paramDescCol">是否強制重新連接, 默認為否</td></tr><tr><td class="paramNameCol">{return}</td> <td class="paramTypeCol">XSServer</td> <td class="paramDescCol">返回自己, 以便串接操作</td></tr></table>
**源碼:**[sdk/php/lib/XSServer.class.php#L185](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XSServer.class.php#L185) (**[顯示](#)**)
`public?function?reopen($force?=?false)
{
????if?($this->_flag?&?self::BROKEN?||?$force?===?true)?{
????????$this->open($this->_conn);
????}
????return?$this;
}`
重新打開連接僅應用于曾經成功打開的連并且異常關閉了
sendCommand()方法
<table class="summaryTable"><tr><td colspan="3"><div class="signature2">public void <b>sendCommand</b>(mixed $cmd)</div></td></tr><tr><td class="paramNameCol">$cmd</td> <td class="paramTypeCol">mixed</td> <td class="paramDescCol">要提交的指令, 支持 XSCommand 實例或 cmd 構造函數的第一參數</td></tr></table>
**源碼:**[sdk/php/lib/XSServer.class.php#L321](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XSServer.class.php#L321) (**[顯示](#)**)
`public?function?sendCommand($cmd)
{
????if?(!$cmd?instanceof?XSCommand)?{
????????$cmd?=?new?XSCommand($cmd);
????}
????$this->write(strval($cmd));
}`
往服務器直接發送指令 (無緩存)
setProject()方法
<table class="summaryTable"><tr><td colspan="3"><div class="signature2">public void <b>setProject</b>(string $name, string $home='')</div></td></tr><tr><td class="paramNameCol">$name</td> <td class="paramTypeCol">string</td> <td class="paramDescCol">項目名稱</td></tr><tr><td class="paramNameCol">$home</td> <td class="paramTypeCol">string</td> <td class="paramDescCol">項目在服務器上的目錄路徑, 可選參數(不得超過255字節).</td></tr></table>
**源碼:**[sdk/php/lib/XSServer.class.php#L251](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XSServer.class.php#L251) (**[顯示](#)**)
`public?function?setProject($name,?$home?=?'')
{
????if?($name?!==?$this->_project)?{
????????$cmd?=?array('cmd'?=>?CMD_USE,?'buf'?=>?$name,?'buf1'?=>?$home);
????????$this->execCommand($cmd,?CMD_OK_PROJECT);
????????$this->_project?=?$name;
????}
}`
設置當前項目
setTimeout()方法
<table class="summaryTable"><tr><td colspan="3"><div class="signature2">public void <b>setTimeout</b>(int $sec)</div></td></tr><tr><td class="paramNameCol">$sec</td> <td class="paramTypeCol">int</td> <td class="paramDescCol">秒數, 設為 0則永不超時直到客戶端主動關閉</td></tr></table>
**源碼:**[sdk/php/lib/XSServer.class.php#L264](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XSServer.class.php#L264) (**[顯示](#)**)
`public?function?setTimeout($sec)
{
????$cmd?=?array('cmd'?=>?CMD_TIMEOUT,?'arg'?=>?$sec);
????$this->execCommand($cmd,?CMD_OK_TIMEOUT_SET);
}`
設置服務端超時秒數
write()方法
<table class="summaryTable"><tr><td colspan="3"><div class="signature2">protected void <b>write</b>(string $buf, string $len=0)</div></td></tr><tr><td class="paramNameCol">$buf</td> <td class="paramTypeCol">string</td> <td class="paramDescCol">要寫入的字符串</td></tr><tr><td class="paramNameCol">$len</td> <td class="paramTypeCol">string</td> <td class="paramDescCol">要寫入的長度, 默認為字符串長度</td></tr></table>
**源碼:**[sdk/php/lib/XSServer.class.php#L368](https://github.com/hightman/xunsearch/blob/master/sdk/php/lib/XSServer.class.php#L368) (**[顯示](#)**)
`protected?function?write($buf,?$len?=?0)
{
????//?quick?return?for?empty?buf
????$buf?=?strval($buf);
????if?($len?==?0?&&?($len?=?$size?=?strlen($buf))?==?0)?{
????????return?true;
????}
????//?loop?to?send?data
????$this->check();
????while?(true)?{
????????$bytes?=?fwrite($this->_sock,?$buf,?$len);
????????if?($bytes?===?false?||?$bytes?===?0?||?$bytes?===?$len)?{
????????????break;
????????}
????????$len?-=?$bytes;
????????$buf?=?substr($buf,?$bytes);
????}
????//?error?occured
????if?($bytes?===?false?||?$bytes?===?0)?{
????????$meta?=?stream_get_meta_data($this->_sock);
????????$this->close(true);
????????$reason?=?$meta['timed_out']???'timeout'?:?($meta['eof']???'closed'?:?'unknown');
????????$msg?=?'Failed?to?send?the?data?to?server?completely?';
????????$msg?.=?'(SIZE:'?.?($size?-?$len)?.?'/'?.?$size?.?',?REASON:'?.?$reason?.?')';
????????throw?new?XSException($msg);
????}
}`
寫入數據
Copyright ? 2008-2011 by [杭州云圣網絡科技有限公司](http://www.xunsearch.com)
All Rights Reserved.
- 權威指南
- 新手上路
- 最新主要變動
- 概述
- 關于 Xunsearch PHP-SDK
- 安裝、升級
- 體驗 demo 項目
- 開發規范
- 開發流程
- 了解基礎對象
- 基礎對象概述
- XS 項目
- XSException 異常
- XSDocument 文檔
- XSIndex 索引管理
- XSSearch 搜索
- XSTokenizer 分詞接口
- 編寫項目配置文件
- 項目配置詳解
- 自定義分詞器
- 編寫第一個配置文件
- 管理索引
- 索引概述
- 添加文檔
- 更新、修改文檔
- 刪除文檔
- 清空索引
- 平滑重建索引
- 使用索引緩沖區
- 自定義SCWS詞庫
- 使用搜索
- 搜索概述
- 構建搜索語句
- 獲取搜索匹配結果
- 獲取搜索匹配數量
- 獲取熱門搜索詞
- 獲取相關搜索詞
- 搜索建議和糾錯
- 按字段值分面搜索
- 使用輔助工具
- RequiredCheck 運行檢測
- Indexer 索引管理器
- Quest 搜索測試工具
- SearchSkel 生成搜索代碼
- IniWizzard 配置文件向導
- Logger 搜索日志管理
- 專題
- 同義詞搜索功能
- 在SDK中使用SCWS分詞
- API 指南
- XS
- XS
- XSCommand
- XSComponent
- XSDocument
- XSErrorException
- XSException
- XSFieldMeta
- XSFieldScheme
- XSIndex
- XSSearch
- XSServer
- XS.tokenizer
- XSTokenizer
- XSTokenizerFull
- XSTokenizerNone
- XSTokenizerScws
- XSTokenizerSplit
- XSTokenizerXlen
- XSTokenizerXstep
- XS.util
- XSCsvDataSource
- XSDataFilter
- XSDatabaseDataSource
- XSDebugFilter
- XSJsonDataSource
- XSUtil
- XS.util.db
- XSDatabase
- XSDatabaseMySQL
- XSDatabaseMySQLI
- XSDatabasePDO
- XSDatabasePDO_MySQL
- XSDatabasePDO_PgSQL
- XSDatabasePDO_SQLite
- XSDatabasePgSQL
- XSDatabaseSQLite
- XSDatabaseSQLite3
- XS.utilf
- XSDataSource
- 其它文檔
- 關于 xunsearch
- 特色和優勢
- Xunsearch 架構簡圖
- 下載 Xunsearch
- 商業服務與支持
- XunSearch 授權許可證