...(显示) public function getCustomDict(){ $res = $this->execCommand(XS_CMD_INDEX_USER_DICT, XS_CMD_OK_INFO); return $res->buf;} 获取自定义词典内容
....class.php#L59 (显示) public function clean(){ $this->execCommand(XS_CMD_INDEX_CLEAN_DB, XS_CMD_OK_DB_CLEAN); return $this;} 完全清空索引数据 如果当前数据库处于重建过程中将禁止清空
Fatal error: Uncaught [XSErrorException] php/lib/XS.php(2366): Use of undefined constant CMD_OK_SCWS_RESULT - assumed 'CMD_OK_SCWS_RESULT'(8) thrown in /mnt/hgfs/askie-wwwroot/taobaolink/bot/xunsearch/php/lib/XS.php on line 502
...ction addDb($name){ $name = strval($name); $this->execCommand(array('cmd' => XS_CMD_SEARCH_ADD_DB, 'buf' => $name)); $this->_curDbs[] = $name; return $this;} 添加搜索的数据库名, 支持多库同时搜索
...on setIgnore($yes = true){ $this->_setting['ignore'] = new XSCommand(XS_CMD_SEARCH_SCWS_SET, XS_CMD_SCWS_SET_IGNORE, $yes === false ? 0 : 1); return $this;} 设置忽略标点符号
... setDuality($yes = true){ $this->_setting['duality'] = new XSCommand(XS_CMD_SEARCH_SCWS_SET, XS_CMD_SCWS_SET_DUALITY, $yes === false ? 0 : 1); return $this;} 设置散字二元组合
...ction setFuzzy($value = true){ $this->_defaultOp = $value === true ? XS_CMD_QUERY_OP_OR : XS_CMD_QUERY_OP_AND; return $this;} 开启模糊搜索 默认情况只返回包含所有搜索词的记录, 通过本方法可以获得更多搜索结果
...ction 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;} 设置要搜索的...
...($mode) & self::MULTI_MASK; $this->_setting['multi'] = new XSCommand(XS_CMD_SEARCH_SCWS_SET, XS_CMD_SCWS_SET_MULTI, $mode); return $this;} 设置复合分词选项