...-query -------------------- 解析后的 QUERY 语句:Xapian::Query(1:(pos=1)) -------------------- 在 3,000 条数据中,大约有 0 条包含 1 ,第 0-0 条,用时:0.0013 秒。
...ange('user_id',1,20000)->setLimit($page_num,($page-1)*$page_num)->setSort('post_time',true)->setQuery($q); print_r($search->query); $docs = $search->search(); print_r结果:Xapian::Query(波:(pos=1)) $docs 中的user_id 并没有限制在 1,20000....
...析结果方法1: // 不带参数,输出:Xapian::Query((神雕侠侣:(pos=1) AND_NOT 电视剧:(pos=2))) echo $search->getQuery(); // 带参数,则解析新语句,输出:Xapian::Query((杭州:(pos=1) AND 西湖:(pos=2))) echo $search->getQuery('杭州 西湖'); // 查看搜索语句解...
...-query -------------------- 解析后的 QUERY 语句:Xapian::Query(1:(pos=1)) -------------------- 在 3,000 条数据中,大约有 0 条包含 1 ,第 0-0 条,用时:0.0013 秒。 [/quote] 我想是因为我设置的是默认的字符串的问题吧 字符串对数字的搜索不太...
...=== '-') { $pname = substr($pname, 1); if (($pos = strpos($pname, '=')) !== false) { $value = substr($pname, $pos + 1); $pname = substr($pname, 0, $pos); } } elseif (strlen($pname) > 1) { for...
... // internal tokenizer $wdf = $field->weight | ($field->withPos() ? XS_CMD_INDEX_FLAG_WITHPOS : 0); if ($field->hasIndexMixed()) { $cmds[] = new XSCommand(XS_CMD_DOC_INDEX, $wdf, XSFieldScheme::MIXED_VNO, $value); } if ($...
...setLimit($gNum,$startPage)->search(); //执行结果 Xapian::Query((疯:(pos=1) AND_MAYBE GD1))[hr] //输出结果 [0] => XSDocument Object ( [_data:XSDocument:private] => Array ( [gid] => 27490 [name] => 摩托车疯...
...fig['server.index']) ? $this->_config['server.index'] : 8383; if (($pos = strpos($conn, ';')) !== false) { $adds = explode(';', substr($conn, $pos + 1)); $conn = substr($conn, 0, $pos); } $this->_index = new XSIndex($conn, $this); $this->_index->setT...
... |= self::FILE; $this->_sock = $sock; return; } elseif (($pos = strpos($conn, ':')) !== false) { $host = substr($conn, 0, $pos); $port = intval(substr($conn, $pos + 1)); } else { $host = 'unix://' . $conn; $port = -1; } if (($sock = @fsockopen($h...
...class.php#L65 (显示) final public function getData(){ if ($this->dataPos === null || $this->dataPos === count($this->dataList)) { $this->dataPos = 0; $this->dataList = $this->getDataList(); if (!is_array($this->dataList) || count($this->dataList) === 0) { $this-...