重建索引库失败
|
2016年08月26日, 14:26
|
|||
|
|||
![]()
删除data目录下test
[root@localhost data]# ls ircs_index test [root@localhost data]# rm -fr test [root@localhost data]# ls ircs_index 然后重建索引库: php代码: require "/home/test/xunsearch/sdk/php/lib/XS.php"; $itemlist[] = array('atime'=>'2016-08-19 09:46:42', 'id'=>4 , 'message'=>"hello\nworld"); $itemlist[] = array('atime'=>'2016-08-19 09:45:34', 'id'=>2 , 'message'=>"hello\rworld"); $itemlist[] = array('atime'=>'2016-08-19 09:45:04', 'id'=>1 , 'message'=>"hello world"); $itemlist[] = array('atime'=>'2016-08-19 09:45:33', 'id'=>3 , 'message'=>"hello, \n\rworld"); $xs = new XS('test'); $xsi = $xs->index; foreach ($itemlist as $item) { $doc = new XSDocument; $doc->setFields($item); $xsi->add($doc); } 运行之后,data下没有生成test: [root@localhost data]# ls ircs_index 请问这是为什么? |
|||
2016年10月11日, 16:18
|
|||
|
|||
RE: 重建索引库失败
在tmp/indexd.log中看到
15:41:39 import[23416] ERROR xapian exception (ERROR:Cannot create directory `data/test/db') 2016-09-11 15:41:39 indexd[2699] NOTICE import exit (DB:test.db, FLAG:0x0002, PID:23416, EXIT:-1) 2016-09-11 15:41:40 indexd[2699] NOTICE [sock:7] auto commit (DB:test.db, COUNT:107390) 2016-09-11 15:41:40 indexd[2699] NOTICE priority use unfinished sndfile (FILE:tmp/test_db.snd) 不知道是什么情况? |
|||
2016年10月12日, 08:34
|
|||
|
|||
RE: 重建索引库失败
xs-ctl.sh restart 重启服务,可以看到test/db
但出现如下错误: PHP Fatal error: Uncaught [XSException] ../../../usr/local/xunsearch/sdk/php/lib/XS.php(2388): IO error(S#502) thrown in /usr/local/xunsearch/sdk/php/lib/XS.php on line 2388 |
|||
|
正在浏览该主题的用户: 1 个游客