...se, $relevance_first = false){ if (!is_array($fields)) { return $this->setSort($fields, !$reverse, $relevance_first); } // [vno][0/1] (0:reverse,1:asc) $buf = ''; foreach ($fields as $key => $value) { if (is_bool($value)) { $vno = $this->xs->getField($key, tru...
...ieldScheme.class.php#L345 (显示) public function isBoolIndex(){ if ($this->flag & self::FLAG_NON_BOOL) { return false; } return (!$this->hasIndex() || $this->tokenizer !== XSTokenizer::DFL);} 判断当前字段的索引是否为布尔型 目前只有内置分词器支持语法...
...n __construct($arg = null){ if ($arg !== null && $arg !== '') { $this->arg = intval($arg); if ($this->arg < 1 || $this->arg > 255) { throw new XSException('Invalid argument for ' . __CLASS__ . ': ' . $arg); } }}
...n __construct($arg = null){ if ($arg !== null && $arg !== '') { $this->arg = intval($arg); if ($this->arg < 1 || $this->arg > 255) { throw new XSException('Invalid argument for ' . __CLASS__ . ': ' . $arg); } }}
...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,...
...示) 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;} 从服务器读...
...ument.class.php#L79 (显示) public function __get($name){ if (!isset($this->_data[$name])) { return null; } return $this->autoConvert($this->_data[$name]);} 魔术方法 __get 实现以对象属性方式获取文档字段值
...cument $doc, $add = false){ // before submit if ($doc->beforeSubmit($this) === false) { return $this; } // check primary key of document $fid = $this->xs->getFieldId(); $key = $doc->f($fid); if ($key === null || $key === '') { throw new XSException('Missing value o...
...(显示) public function setProject($name, $home = ''){ if ($name !== $this->_project) { $cmd = array('cmd' => XS_CMD_USE, 'buf' => $name, 'buf1' => $home); $this->execCommand($cmd, XS_CMD_OK_PROJECT); $this->_project = $name; }} 设置当前项目
... 1){ $term = strtolower($term); $term = XS::convert($term, 'UTF-8', $this->_charset); $bscale = ($scale > 0 && $scale != 1) ? pack('n', intval($scale * 100)) : ''; $vno = $field === null ? XSFieldScheme::MIXED_VNO : $this->xs->getField($field, true)->vno; $cmd = new XSCommand(XS_CMD_Q...