...okenizer.class.php#L242 (显示) public function setCharset($charset){ self::$_charset = strtoupper($charset); if (self::$_charset == 'UTF8') { self::$_charset = 'UTF-8'; } return $this;} 设置字符集 默认字符集是 UTF-8, 这是指 getResult 系列函数的 $text 参...
...is->setIgnore(true); // save charset, force to use UTF-8 $_charset = self::$_charset; self::$_charset = 'UTF-8'; $words = $this->getResult($value); foreach ($words as $word) { $tokens[] = $word['word']; } // restore charset self::$_charset = $_charset; return $token...
...ntent] type = string index = both [user_id] type = numeric index = self tokenizer = full [post_time] type = numeric index = self tokenizer = full [forward] type = numeric index = self tokenizer = full [reply_num] type = numeric index = self tokenizer = full xunsearc...
...ame too long 这就是说是Name 太长 而我的搜索语句是六个”self 字段索引“ 当我尝试只搜索4个“self 字段索引”的时候就不会报错,是不是讯搜本身对”self 字段索引“做了限制 只允许至多4个?util/Quest.php 这种方式六个字段索引...
....class.php#L188 (显示) public function __construct($arg = null){ if (self::$_server === null) { $xs = XS::getLastXS(); if ($xs === null) { throw new XSException('An XS instance should be created before using ' . __CLASS__); } self::$_server = $xs->getScws...
...ic function close($ioerr = false){ if ($this->_sock && !($this->_flag & self::BROKEN)) { if (!$ioerr && $this->_sendBuffer !== '') { $this->write($this->_sendBuffer); $this->_sendBuffer = ''; } if (!$ioerr && !($this->_flag & self::FILE)) { $c...
...mmand(XS_CMD_SEARCH_SCWS_GET, XS_CMD_SCWS_GET_RESULT, 0, $text); $res = self::$_server->execCommand($cmd, XS_CMD_OK_SCWS_RESULT); while ($res->buf !== '') { $tmp = unpack('Ioff/a4attr/a*word', $res->buf); $tmp['word'] = XS::convert($tmp['word'], self::$_charset, 'UTF-8'); ...
...('scws.default.fpath') . '/dict.utf8.xdb'); $scws->add_dict('/path/to/dict.self.txt', SCWS_XDICT_TXT); 那么就是后面的 dict.self.txt 优先查询,如果 dict.self.txt 中不存在相关记录才会往回查 dict.utf8.xdb,反之也一样
...roject.name = city [ID] type = id tokenizer = none [name] index = self tokenizer = xstep(1) cutlen = 15 phrase = yes [name_sc] index = self cutlen = 15 weight = 4 phrase = yes [name_tc] index = self cutlen = 15 weight = 3 phrase = yes 现在中文字都可以了,...
...tle index=both [content] type = body index = mixed [lv1] index = self tokenizer = full [lv2] index = self tokenizer = full [lv3] index = self tokenizer = full [school_id] index = self tokenizer = full [sort] type=numeric index=none [update_time] type=numeric index...