...() {return} XSFieldScheme 搜索日志字段方案 源码: sdk/php/lib/XSFieldScheme.class.php#L198 (显示) public static function logger(){ if (self::$_logger === null) { $scheme = new self; $scheme->addField('id', array('type' => 'id')); $scheme->addField('pin...
...eturn} XSIndex 返回自身对象以支持串接操作 源码: sdk/php/lib/XSIndex.class.php#L362 (显示) public function openBuffer($size = 4){ if ($this->_buf !== '') { $this->addExdata($this->_buf, false); } $this->_bufSize = intval($size) << 20; $this->_buf = ''; ...
...ed 返回一条完整数据, 若无数据则返回 false 源码: sdk/php/util/XSDataSource.class.php#L65 (显示) final public function getData(){ if ($this->dataPos === null || $this->dataPos === count($this->dataList)) { $this->dataPos = 0; $this->dataList = $this->getDataL...
... string 要执行的 SQL 语句 {return} mixed 源码: sdk/php/util/XSDataSource.class.php#L781 (显示) public function query($sql){ //echo "[DEBUG] SQL: $sql\n"; $res = $this->obj->query($sql); if ($res === false) { throw new XSException('SQLITE3 ERROR(#' . $this->...
...turn} XSSearch 返回对象本身以支持串接操作 源码: sdk/php/lib/XSSearch.class.php#L98 (显示) public function setCutOff($percent, $weight = 0){ $percent = max(0, min(100, intval($percent))); $weight = max(0, (intval($weight * 10) & 255)); $cmd = new XSCommand(XS_CMD_SE...
...} 查询结果[b]首行, 失败或无数据[/b]则返回 false 源码: sdk/php/util/XSDataSource.class.php#L450 (显示) public function query1($sql){ $sql = preg_replace('/ limit\s+(\d+)(?:\s*...
...n` 即可。 一段典型的处理代码应类似下面的方式: ~~~ [php] require '$prefix/sdk/php/lib/XS.php'; try { $xs = new XS('demo'); $docs = $xs->search->setQuery('hightman')->setLimit(5)->search(); foreach ($docs as $doc) { echo $doc->rank() . ". " . $doc->subjec...
...ing 用于填充补足的字符 {return} string 源码: sdk/php/util/XSUtil.class.php#L50 (显示) public static function fixWidth($text, $size, $pad = ' '){ for ($i = $j = 0; $i < strlen($text) && $j < $size; $i++, $j++) { if ((ord($text[$i]) & 0xe0) === 0xe0) { ...
...是去修改系统的过滤器,比如你在 /usr/local/xunsearch/sdk/php/lib/ 创建文件 XSTestFilter.php,然后按要求实现这个过滤器。
...turn} XSSearch 返回对象本身以支持串接操作 源码: sdk/php/lib/XSSearch.class.php#L129 (显示) public function setAutoSynonyms($value = true){ $flag = XS_CMD_PARSE_FLAG_BOOLEAN | XS_CMD_PARSE_FLAG_PHRASE | XS_CMD_PARSE_FLAG_LOVEHATE; if ($value === true) { $flag |=...