...array('cmd' => XS_CMD_USE, 'buf' => $name, 'buf1' => $home); $this->execCommand($cmd, XS_CMD_OK_PROJECT); $this->_project = $name; }} 设置当前项目
...ss.php#L466 (显示) public function flushIndex(){ try { $this->execCommand(XS_CMD_INDEX_COMMIT, XS_CMD_OK_DB_COMMITED); } catch (XSException $e) { if ($e->getCode() === XS_CMD_ERR_BUSY || $e->getCode() === XS_CMD_ERR_RUNNING) { return false; } throw $e;...
...1 lib/XS.php(2065): XSServer->getRespond() #2 lib/XS.php(2042): XSServer->execCommand(Array, 201) #3 lib/XS.php(2003): XSServer->setProject('demo') #4 lib/XS.php(1986): XSServer->open('8383') #5 lib/XS.php(326): XSServer->__construct('8383', Object(XS)) #6 lib/XS.php(240): XS->getIndex() #7 In...
...; $cmd = new XSCommand(XS_CMD_SEARCH_SET_MISC, $arg1, $arg2); $this->execCommand($cmd); return $this;} 设置同义词搜索的权重比例
...XSIndex.class.php#L391 (显示) public function beginRebuild(){ $this->execCommand(array('cmd' => XS_CMD_INDEX_REBUILD, 'arg1' => 0), XS_CMD_OK_DB_REBUILD); $this->_rebuild = true; return $this;} 开始重建索引 此后所有的索引更新指令将写到临时库, 而不是当前搜...
...s.php#L420 (显示) public function stopRebuild(){ try { $this->execCommand(array('cmd' => XS_CMD_INDEX_REBUILD, 'arg1' => 2), XS_CMD_OK_DB_REBUILD); $this->_rebuild = false; } catch (XSException $e) { if ($e->getCode() !== XS_CMD_ERR_WRONGPLACE) { throw $e; ...
...; if ($wdf > 1) { $cmd['buf1'] = pack('i', $wdf); } $this->execCommand($cmd, XS_CMD_OK_LOGGED);} 添加搜索日志关键词到缓冲区里 需要调用 XSIndex::flushLogging 才能确保立即刷新, 否则要隔一段时间
...WS_GET, XS_CMD_SCWS_HAS_WORD, 0, $text, $xattr); $res = self::$_server->execCommand($cmd, XS_CMD_OK_INFO); return $res->buf === 'OK';} 判断是否包含指定词性的词
...NG : 0); $cmd = new XSCommand(XS_CMD_SEARCH_SET_SORT, $type); $this->execCommand($cmd); return $this;} 设置结果按索引入库先后排序 注意, 此项排序不影响相关排序, 权重高的仍会在前面, 主要适合用于布尔检索
...显示) public function setDb($name){ $name = strval($name); $this->execCommand(array('cmd' => XS_CMD_SEARCH_SET_DB, 'buf' => strval($name))); $this->_lastDb = $this->_curDb; $this->_lastDbs = $this->_curDbs; $this->_curDb = $name; $this->_curDbs = array(); return $this;} ...