[功能缺陷] [已解决]
batev1.0版采集器会生成重复章节(临时)
生成重复章节的事情已经在下一版的采集器中修复!
另外之前采集到的重复章节,执行下面的sql就可以把重复的章节从数据库里删掉,但是采集回来txt文件会保留
要是windows用户的话,启动pgadmin执行下面的sql
要是linux用户的的
用root用户登录
切换到postgres用户
[root@v157-7-197-211 ~]# su - postgres
连接数据库
-bash-4.1$ psql -d yidu
粘帖SQL后,按回车
yidu=#
提示删除行数
DELETE 32384
SQL,其中的时间请自行修改,从用采集器batev1.0版的时候开始就行了
delete from t_chapter
where chapterno in (
select min(chapterno)
from t_chapter tc
inner join (
select articleno ,chaptername from t_chapter
where postdate > '2014/02/01'
group by articleno,chaptername having count(1)>1
) tc1
on tc.chaptername = tc1.chaptername and tc.articleno = tc1.articleno
where tc.postdate > '2014/02/01'
group by tc.chaptername
);