不幸的是,我认为错误不是,因此他已自动更新了增量
我在“数据库”中有此表addet
# in MySQL
CREATE TABLE sph_counter
(
counter_id INTEGER PRIMARY KEY NOT NULL,
max_doc_id INTEGER NOT NULL
);
source database
{
type = mysql
sql_host = localhost
sql_user = root
sql_pass = root
sql_db = database
sql_port = 3306 # optional, default is 3306
sql_query = \
SELECT ID, name, dir, UNIX_TIMESTAMP(ctime) AS ctime, \
FROM database
sql_field_string = dir
sql_field_string = name
}
source delta : database
{
sql_range_step = 2
sql_query_pre = SET NAMES utf8
sql_query = SELECT id, title, body FROM documents \
WHERE id>( SELECT max_doc_id FROM sph_counter WHERE counter_id=1 )
sql_query_pre = REPLACE INTO sph_counter_rls SELECT 1, MAX(ID) FROM `database`
}
index delta : database
{
source = database
path = /home/data/delta
}
index database
{
source = database
path = /home/data/database
docinfo = extern
#charset_type = sbcs
morphology = none
stopwords =
# minimum indexed word length
# default is 1 (index everything)
min_word_len = 1
charset_table = 0..9, A..Z->a..z, a..z, -, U+0028, U+0029
#enable_star = 1
min_prefix_len = 0
min_infix_len = 2
ngram_len = 0
}
编辑:我有addet:索引增量...
索引器-全部 Sphinx 2.2.11-id64-release(95ae9a6) 版权所有(c)2001-2016,Andrew Aksyonoff Sphinx Technologies Inc(http://sphinxsearch.com)版权所有(c)2008-2016
使用配置文件'/etc/sphinxsearch/sphinx.conf'... 索引索引'数据库'... 收集了100个文档,0.0 MB 已排序0.0 Mhit,完成了100.0% 总计100个文档,8982个字节 总计0.078秒,114887字节/秒,1279.08文档/秒 索引索引'delta'... 收集了100个文档,0.0 MB 已排序0.0 Mhit,完成了100.0% 总计100个文档,8982个字节 总计0.063秒,140585字节/秒,1565.19文档/秒 总共212次读取,0.000秒,0.3 kb /通话平均值,0.0毫秒/通话平均值 总共24次写入,0.000秒,6.3 kb /通话平均值,0.0毫秒/通话平均值
答案 0 :(得分:0)
您的“ delta”索引根本没有建立,因为它没有在配置中定义。仅定义了“ delta”源。而且只有INDEX-使用源“数据库”而不是“增量”的数据库