...[_meta:XSDocument:private] => Array ( [docid] => 9509 [rank] => 1 [ccount] => 0 [percent] => 50 [weight] => 7.0688500404358 ) ) [1] => XSDocument Object ...
... [_meta:private] => Array ( [docid] => 111587 [rank] => 1 [ccount] => 0 [percent] => 75 [weight] => 2.3821949958801 ) ) [1] => XSDocume...
...) public function setDocOrder($asc = false){ $type = XS_CMD_SORT_TYPE_DOCID | ($asc ? XS_CMD_SORT_FLAG_ASCENDING : 0); $cmd = new XSCommand(XS_CMD_SEARCH_SET_SORT, $type); $this->execCommand($cmd); return $this;} 设置结果按索引入库先后排序 注意, 此项排序不影响...
...术方法 __call 实现以函数调用访问搜索结果元数据, 支持: docid, rank, percent, weight, ccount
...外,还支持以下魔术方法来访问搜索结果的元数据: - `docid()` 取得搜索结果文档的 docid 值 (实际数据库内的 id,一般用不到) - `rank()` 取得搜索结果文档的序号值 (第X条结果) - `percent()` 取得搜索结果文档的匹配百分比 (结果匹配...
...meta:XSDocument:private] => Array ( [docid] => 865 [rank] => 6 [ccount] => 0 [percent] => 97 [weight] => 7.2940921783447 ) ) ) json_encode之后就...
... [_meta:private] => Array ( [docid] => 1 [rank] => 1 [ccount] => 0 [percent] => 100 [weight] => 0 ) ) [1] => XSDocument Object [/code]...
... `XSDocument` 相关用法。 ```php $model = Demo::findOne(321); $model->docid(); //Xapian数据 ID $model->rank(); //序号 $model->percent(); //匹配百分比 $model->ccount(); //折叠数量,须在 XSSearch::setCollapse() 指定后才有效 $model->matched(); //获得匹配词汇 ``` Active...
...术方法 __call 实现以函数调用访问搜索结果元数据, 支持: docid, rank, percent, weight, ccount __construct() 方法 public void __construct(mixed $p=NULL, string $d=NULL) $p mixed 字符串表示索引文档的编码或搜索结果文档的 meta 数据, 数组则...
...) public function setDocOrder($asc = false){ $type = XS_CMD_SORT_TYPE_DOCID | ($asc ? XS_CMD_SORT_FLAG_ASCENDING : 0); $cmd = new XSCommand(XS_CMD_SEARCH_SET_SORT, $type); $this->execCommand($cmd); return $this;} 设置结果按索引入库先后排序 注意, 此项排序不影响...