斯芬克斯停止了索引

在执行旋转和重新生成索引之后,Sphinx不会包含来自数据库的新记录.它不会给出任何错误,也包括旧的索引数据.

我删除了数据文件并再次尝试,但结果是一样的.
我也应用了范围查询但结果是一样的.

所以,我现在无法更新我的搜索索引:(

在这里我给出了我的配置,谢谢你的提示:)

source search_song
{
    type                                    = mysql
    sql_host                                = localhost
    sql_user                                = myusername
    sql_pass                                = mypass
    sql_db                                  = mydb
    sql_port                                = 3306  # optional, default is 3306

    sql_query_pre                   = SET NAMES utf8
    sql_query_pre                   = SET NAMES utf8 COLLATE utf8_turkish_ci
    sql_query_pre                   = SET CHARACTER SET utf8
    sql_query_pre                   = SET COLLATION_CONNECTION = utf8_turkish_ci

    sql_query_range                 = SELECT MIN(song_ID), MAX(song_ID) FROM song
    sql_range_step                  = 20000
    sql_query                       = SELECT song.song_ID, artist.artist_ID, song.title, song_stats.total_read, IF(artist.flag_The = 1, CONCAT("The ", artist.name), artist.name) AS fullname \
                                            FROM song \
                                            INNER JOIN artist ON artist.artist_ID = song.artist_ID \
                                            LEFT JOIN song_stats ON song_stats.song_ID = song.song_ID \
                                            WHERE song.song_ID >= $start AND song.song_ID <= $end;
    sql_attr_uint                   = total_read
}



index search_song
{
    source                  = search_song
    path                    = /var/lib/sphinxsearch/data/search_song
    morphology              = metaphone
    min_word_len            = 1
    min_prefix_len          = 2
    enable_star             = 1
    charset_type            = utf-8
 #   exceptions              = /var/lib/sphinxsearch/exceptions.txt
    charset_table           = A->a, B->b, C->c, U+C7->c, U+E7->c, D..G->d..g, U+11E->g, U+11F->g, H->h, I->i, U+131->i, U+130->i, J..O->j..o, U+D6->o, U+F6->o, P..S->p..s, U+15E->s, U+15F->s, T..U->t..u, U+DC->u, U+FC->u, V..Z->v..z, _, a..z,[,],0..9
}

最佳答案 它没有范围吗?只是sql_query,没有范围和步骤?

我怀疑SQL查询可能会限制结果.

点赞