...认则为 `db` * `setFuzzy()` - 设置开启模糊搜索, 传入参数 false 可关闭模糊搜索 * `setLimit($limit, $offset = 0)` - 设置搜索结果返回的数量和偏移 * `setQuery($query)` - 设置搜索语句 * `setSort($field, $asc = false)` - 设置搜索结果按字段值排序...
...segment $cws = scws_new(); $cws->set_charset('utf8'); $cws->set_duality(false); $cws->set_ignore(false); $cws->set_multi(0); $limit=10; $xattr = '~v';[/code] [size=x-large][u][b]求解,不胜感激!![/b][/u][/size][hr] 好奇怪,我分出来的都是nr,我本地用的是demo的...
...nizer]; } else { if (($pos1 = strpos($this->tokenizer, '(')) !== false && ($pos2 = strrpos($this->tokenizer, ')', $pos1 + 1))) { $name = 'XSTokenizer' . ucfirst(trim(substr($this->tokenizer, 0, $pos1))); $arg = substr($this->tokenizer, $pos1 + 1, $pos2 ...
... && file_exists($data) && ($data = file_get_contents($data)) === false) { throw new XSException('Failed to read exdata from file'); } // try to check allowed (BUG: check the first cmd only): // XS_CMD_IMPORT_HEADER, XS_CMD_INDEX_REQUEST, XS_CMD_INDEX_REMOVE, XS_CMD_INDEX_EX...
...Filter implements XSDataFilter { public function process($data, $cs =false) { $data['content'] = $this->filterHtml($data['content']); return $data; } public function filterHtml($str) { $str=eregi_replace("", '', $str); ...
... "[DEBUG] SQL: $sql\n"; $res = $this->obj->query($sql); if ($res === false) { throw new XSException('SQLITE3 ERROR(#' . $this->obj->lastErrorCode() . '): ' . $this->obj->lastErrorMsg()); } if (!is_object($res)) { $ret = $res; } else { $ret = array(); while ...
...测, 若检测结果不符 则认为命令调用失败, 会返回 false 并设置相应的出错信息 $res_cmd int 要求的响应指令, 默认为 XS_CMD_OK 即要求结果必须正确. {return} mixed 若无需要检测结果则返回 true, 其它返回响应的 XSCommand ...
...ex 索引操作对象 {return} bool 默认返回 true, 若返回 false 将阻止该文档提交到索引服务器 源码: sdk/php/lib/XSDocument.class.php#L331 (显示) public function beforeSubmit(XSIndex $index){ if ($this->_charset === null) { $this->_charset = $index->xs...
...UG] SQL: $sql\n"; $res = pg_query($this->link, $query); if ($res === false) { throw new XSException('PgSQL ERROR: ' . pg_last_error($this->link)); } $ret = array(); while ($tmp = pg_fetch_assoc($res)) { $ret[] = $tmp; } pg_free_result($res); return $ret;} ...
... "[DEBUG] SQL: $sql\n"; $res = $this->obj->query($sql); if ($res === false) { $info = $this->obj->errorInfo(); throw new XSException('SQLSTATE[' . $info[0] . '] [' . $info[1] . '] ' . $info[2]); } $ret = $res->fetchAll(PDO::FETCH_ASSOC); return $ret;} 执行 SQL 语...