...20, intval($limit))); try { $buf = XS::convert($query, 'UTF-8', $this->_charset); $cmd = array('cmd' => XS_CMD_QUERY_GET_EXPANDED, 'arg1' => $limit, 'buf' => $buf); $res = $this->execCommand($cmd, XS_CMD_OK_RESULT_BEGIN); // echo "Raw Query: " . $res->buf . "\n"; ...
...L492 (显示) public function addDb($name){ $name = strval($name); $this->execCommand(array('cmd' => XS_CMD_SEARCH_ADD_DB, 'buf' => $name)); $this->_curDbs[] = $name; return $this;} 添加搜索的数据库名, 支持多库同时搜索
...::$_charset == 'UTF8') { self::$_charset = 'UTF-8'; } return $this;} 设置字符集 默认字符集是 UTF-8, 这是指 getResult 系列函数的 $text 参数的字符集
...INDEX_SYNONYMS, XS_CMD_INDEX_SYNONYMS_ADD, 0, $raw, $synonym); if ($this->_bufSize > 0) { $this->appendBuffer(strval($cmd)); } else { $this->execCommand($cmd, XS_CMD_OK_RQST_FINISHED); } } return $this;} 添加同义词
...p/lib/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;} 开始重建索引 此后所有的索引更新指令将写到临时库, 而不是当...
...x.class.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 ...
...INDEX_SYNONYMS, XS_CMD_INDEX_SYNONYMS_DEL, 0, $raw, $synonym); if ($this->_bufSize > 0) { $this->appendBuffer(strval($cmd)); } else { $this->execCommand($cmd, XS_CMD_OK_RQST_FINISHED); } } return $this;} 删除某个同义词
f() 方法 public mixed f(string $name) $name string 字段名称 {return} mixed 字段值, 若不存在则返回 null 源码: sdk/php/lib/XSDocument.class.php#L192 (显示) public function f($name){ return $this->__get(strval($name));} 获取文档字段的值
...ment.class.php#L298 (显示) public function offsetGet($name){ return $this->__get($name);} ArrayAccess 接口, 取得字段值, 勿直接调用
... { ! if (!SCWS_IS_DIGIT(ch)) { // strict must add: !$this->_is_digit(ord($this->txt[$start+1]))) if ((pflag & PFLAG_ADDSYM) || ch != 0x2e || !SCWS_IS_DIGIT(txt[start+1])) break; ! pflag |= PFLAG_ADDSYM; } } else { ! ...