...p, $query); $res = $this->execCommand($cmd, XS_CMD_OK_QUERY_STRING); if (strpos($res->buf, 'VALUE_RANGE') !== false) { $regex = '/(VALUE_RANGE) (\d+) (\S+) (.+?)(?=\))/'; $res->buf = preg_replace_callback($regex, array($this, 'formatValueRange'), $res->buf); } if (strpos($r...
...Document.class.php#L108 (显示) public function __call($name, $args){ if ($this->_meta !== null) { $name = strtolower($name); if (isset($this->_meta[$name])) { return $this->_meta[$name]; } } throw new XSException('Call to undefined method `' . get_class($t...
...是一个中国人, 我有时买Q币来玩, 我还听说过C#语言"; if (!(s = scws_new())) { printf("ERROR: cann't init the scws!\n"); exit(-1); } scws_set_charset(s, "utf8"); scws_set_dict(s, "/usr/local/scws/etc/dict.utf8.xdb", SCWS_XDICT_XDB); scws_set_rule(s, "/usr/l...
我这个是简单的改动,就是注释掉了一段代码 [code] diff -ur scws-1.2.1/libscws/scws.c scws-1.2.1.changed/libscws/scws.c --- scws-1.2.1/libscws/scws.c 2013-01-11 10:39:28.000000000 +0800 +++ scws-1.2.1.changed/libscws/scws.c 2013-07-03 10:38:49.409846632 +0800 @@ -60,6 +60,9 @@ s->...
...示) public function setFacets($field, $exact = false){ $buf = ''; if (!is_array($field)) { $field = array($field); } foreach ($field as $name) { $ff = $this->xs->getField($name); if ($ff->type !== XSFieldMeta::TYPE_STRING) { throw new XSException("Field ...
...is->arg; while (true) { $terms[] = substr($value, 0, $i); if ($i >= strlen($value)) { break; } $i += $this->arg; } return $terms;}
...示) public function setScwsMulti($level){ $level = intval($level); if ($level >= 0 && $level < 16) { $cmd = array('cmd' => XS_CMD_SEARCH_SCWS_SET, 'arg1' => XS_CMD_SCWS_SET_MULTI, 'arg2' => $level); $this->execCommand($cmd); } return $this;} 设置当前索引库的...
...86 (显示) public function getTokens($value, XSDocument $doc = null){ if (strlen($this->arg) > 2 && substr($this->arg, 0, 1) == '/' && substr($this->arg, -1, 1) == '/') { return preg_split($this->arg, $value); } return explode($this->arg, $value);}
...XSDataSource.class.php#L220 (显示) protected function getDataList(){ if ($this->limit <= 0) { return false; } $sql = $this->sql . ' LIMIT ' . min(self::PLIMIT, $this->limit) . ' OFFSET ' . $this->offset; $this->limit -= self::PLIMIT; $this->offset += self::PLIMIT; return ...
... $i = 0; foreach($row->cats as $node){ $cid = $node->getId(); if($i++ == 0){ $doc->setField('cid', $cid); }else{ $doc->addTerm('cid', $cid); } // 父类别id while($node = $node->getParent()){ $doc->addTerm('cid', $node->getId...