哦这样啊 谢谢了,祝愿xs 越来越好,顶了。[hr] 这样子对否? $doc = new XSDocument; $doc->setFields($data); $index->beginRebuild(); $index->add($doc);//如果写update 行不行? $index->endRebuild();
...no' => time() ); // 创建文档对象 $doc = new XSDocument; $doc->setFields($data);
$doc = new XSDocument; $doc->setFields($v); 改为 $doc = new XSDocument($v);
...{ //获取分类 $arrTag = .........;//一维数组 $doc->setFields($data); $index->add($doc); foreach ($arrTag as $kt=>$vt) { $doc -> addTerm('cat', $vt); } dump($doc -> getAddTerms('b_tag_id')); } 是这样...
...ch ($data as $k => $v) { $doc = new XSDocument; $doc->setFields($v); $index->update($doc); } $index->endRebuild(); 问题 1:命令行下平滑重建能不能输出执行时间 2:A和B方法重建原理一样吗?为什么我使用B方...
... ); $document = new XSDocument; $document->setFields($array); $index->update($document); } $index->closeBuffer(); } $index->endRebuild(); [/php] 实际数据为61084,但是写入到index的数据不确定 在调整每次读取...
...s $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()); } } 搜索 $searc...
... $doc = new XSDocument; $doc->setFields($data); if ($isnewdoc) { // 添加到索引数据库中 $index->add($doc); } else { ...
... ); $document = new XSDocument; $document->setFields($array); $index->add($document); echo (string)$wiki->getId()." is update to xunsearch Document \r\n"; $wiki_date = new MongoDate($wiki->getCreatedAt()->getTimestamp()); ...
...e', 'goods_sn' => 'RX8899-114' ); $doc = new XSDocument; $doc->setFields($data); $xs->index->add($doc); 3. 查询 3.1 $docs = $xs->search->search('RX8899-114'); ===> 无结果 3.2 $docs = $xs->search->search('RX8899'); ===> 有结果 3.3 $docs = $xs->search->search...