$doc = new XSDocument; $doc->setFields($v); 改为 $doc = new XSDocument($v);
哦这样啊 谢谢了,祝愿xs 越来越好,顶了。[hr] 这样子对否? $doc = new XSDocument; $doc->setFields($data); $index->beginRebuild(); $index->add($doc);//如果写update 行不行? $index->endRebuild();
...部分', 'chrono' => time() ); // 创建文档对象 $doc = new XSDocument; $doc->setFields($data);
...eginRebuild(); foreach ($data as $k => $v) { $doc = new XSDocument; $doc->setFields($v); $index->update($doc); } $index->endRebuild(); 问题 1:命令行下平滑重建能不能输出执行时间 2:A和B方法重建原理一样...
... 'time' => time() ); $document = new XSDocument; $document->setFields($array); $index->update($document); } $index->closeBuffer(); } $index->endRebuild(); [/php] 实际数据为61084,但是写入到index的数...
...长,省略了 // 创建文档对象 $doc = new XSDocument; $doc->setFields($data); if ($isnewdoc) { // 添加到索引数据库中 $index->add($doc); ...
... 'time' => time() ); $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->getC...
... 'hello my goodsname', '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 = ...
...k/php/lib/XS.php'; $xs = new XS('zl'); $index = $xs->index; $doc = new XSDocument; $conn=mysql_connect("localhost", "root", "111111") or die("Could not connect: " . mysql_error()); mysql_select_db('zi, $conn) or die ('Can\'t use test : ' . mysql_error()); $result=mysql_query("select id,titl...
... $thread['tid'] = $tid; $doc = new XSDocument; $doc->setFields($thread); $index->add($doc); } echo '200'; ...