YYwlo / sphinx-for-chinese

Automatically exported from code.google.com/p/sphinx-for-chinese
0 stars 0 forks source link

在增量索引的时候,不能替换掉以前的记录 #9

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
举个例子
有用户  昵称为  
abc,在没更改昵称前索引没有问题,如果更改为def,那么此时合
并索引后,
abc,def都可以查出这个用户,请问下,怎么来避免这种问题?

Original issue reported on code.google.com by zlzj2...@gmail.com on 20 Apr 2010 at 1:56

GoogleCodeExporter commented 8 years ago
我增量索引的命令大概如下,是使用的删除合并索引的命令��
�
/data2/sfcsph910/bin/indexer  --rotate  --config 
/data2/sfcsph910/etc/sphinx.conf 
user11
/data2/sfcsph910/bin/indexer --merge user1 user11 --merge-dst-range deleted 0 0 
--
rotate

Original comment by zlzj2...@gmail.com on 20 Apr 2010 at 2:44

GoogleCodeExporter commented 8 years ago
楼上正解

官方文档中在讲到主索引和增量索引时,出现了这样一个开��
�:
--merge-dst-range

这个开关允许您在合并过程中对目标索引实施过滤。过滤器��
�以有多个,只有满足全部过滤
条件的文档才会在最终合并后的索引中出现。
例如:
indexer --merge main delta --merge-dst-range deleted 0 0

Original comment by Dia...@gmail.com on 18 Aug 2010 at 4:10