...赋值或取值,也支持数组下标方式访问文档字段。 ~~~ [php] $doc = new XSDocument; $doc->name = 'value'; // 用对象属性方式进行赋值、取值 $doc['name'] = 'value'; // 用数组下标方式进行赋值、取值 $value = $doc->f('name'); // 用函数方式进行取值 $doc...
... {return} array 可用于高亮显示的词条列表 源码: sdk/php/lib/XSSearch.class.php#L515 (显示) public function terms($query = null, $convert = true){ $query = $query === null ? '' : $this->preQueryString($query); if ($query === '' && $this->_terms !== null) { $ret ...
... XSTokenizerScws 返回对象本身以支持串接操作 源码: sdk/php/lib/XSTokenizer.class.php#L316 (显示) public function setDuality($yes = true){ $this->_setting['duality'] = new XSCommand(XS_CMD_SEARCH_SCWS_SET, XS_CMD_SCWS_SET_DUALITY, $yes === false ? 0 : ...
...回以搜索词为键, 搜索指数为值的关联数组 源码: sdk/php/lib/XSSearch.class.php#L673 (显示) public function getHotQuery($limit = 6, $type = 'total'){ $ret = array(); $limit = max(1, min(50, intval($limit))); // query from log_db $this->xs->setScheme(XSFieldScheme::...
...eturn} XSIndex 返回自身对象以支持串接操作 源码: sdk/php/lib/XSIndex.class.php#L404 (显示) public function endRebuild(){ if ($this->_rebuild === true) { $this->_rebuild = false; $this->execCommand(array('cmd' => XS_CMD_INDEX_REBUILD, 'arg1' => 1), XS_CMD_OK_...
...句 {return} string 返回解析后的搜索语句 源码: sdk/php/lib/XSSearch.class.php#L204 (显示) public function getQuery($query = null){ $query = $query === null ? '' : $this->preQueryString($query); $cmd = new XSCommand(XS_CMD_QUERY_GET_STRING, 0, $this->_defaultOp, $quer...
require_once './lib/XS.php'; $xs = new XS('demo'); $search = $xs->search; $docs = $search->search('cat_ids:108 a'); ---------------------------------------------------------- project.name = demo project.default_charset = utf-8 server.index = 8383 server.search = 8384 [goods...
require_once './lib/XS.php'; $xs = new XS('demo'); $search = $xs->search; $docs = $search->search('cat_ids:108 a'); ---------------------------------------------------------- project.name = demo project.default_charset = utf-8 server.index = 8383 server.search = 8384 [goods...
...eturn} XSIndex 返回自身对象以支持串接操作 源码: sdk/php/lib/XSIndex.class.php#L439 (显示) public function setDb($name){ $this->execCommand(array('cmd' => XS_CMD_INDEX_SET_DB, 'buf' => $name), XS_CMD_OK_DB_CHANGED); return $this;} 更改存放索引数据的目录 ...
...上的目录路径, 可选参数(不得超过255字节). 源码: sdk/php/lib/XSServer.class.php#L251 (显示) public function setProject($name, $home = ''){ if ($name !== $this->_project) { $cmd = array('cmd' => XS_CMD_USE, 'buf' => $name, 'buf1' => $home); $this->execCommand($...