0

我不知道为什么 killlist 不能正常工作?

我的 sphinx.conf 看起来像这样:

source main
{
    type            = mysql

    sql_host        = localhost
    sql_user        = root
    sql_pass        =
    sql_db          = sphinx

    sql_port        = 3306  # optional, default is 3306
    sql_query_pre = SET NAMES utf8
    sql_query_pre = REPLACE INTO sph_counter SELECT 1, MAX(id) FROM documents
    sql_query       = \
        SELECT id, group_id, UNIX_TIMESTAMP(date_added) AS date_added, title, content \
        FROM documents \
        WHERE id<=( SELECT max_doc_id FROM sph_counter WHERE counter_id=1 )

    sql_attr_uint       = group_id
    sql_field_string        = title
    sql_attr_timestamp  = date_added

    sql_query_info      = SELECT * FROM documents WHERE id=$id
}

source delta : main
{
    sql_query_pre = SET NAMES utf8
    sql_query = SELECT id, group_id, UNIX_TIMESTAMP(date_added) AS date_added, title, content \
        FROM documents \
        WHERE id>( SELECT max_doc_id FROM sph_counter WHERE counter_id=1 )

    sql_query_killlist = \
    SELECT id FROM documents WHERE date_added>=@last_reindex UNION \
    SELECT id FROM documents_deleted WHERE deleted_ts>=@last_reindex
}

index main
{
    source = main
    path = C:/Sphinx/data/main
    # ... all the other settings

}

# note how all other settings are copied from main,
# but source and path are overridden (they MUST be)
index delta : main
{
    source = delta
    path = C:/Sphinx/data/delta
 }

当我更新数据库中的一项时,date_add 被更改并且内容即使在 delta 索引被刷新后我仍然得到旧的结果??

4

0 回答 0