douxie9471 2012-05-11 05:11
浏览 231
已采纳

Sphinx_Query失败:没有启用本地索引进行搜索

Hi I configured sphinx search in my test server.

Now I am getting this kind of an error "Sphinx_Query failed: no enabled local indexes to search".

I am not getting why this error. Any body can help me plese.

This is my sphinx conf

source objectcollection
{
    type                    = mysql
    sql_host                = localhost
    sql_user                = root
    sql_pass                = root
    sql_db                  = mydatabase
    sql_port                = 3306  

    sql_query                       = \
        SELECT id, id as mid  obtype_id, searchtext from tab_objectcollection;

    sql_attr_uint           = mid
    sql_attr_uint           = obtype_id
    sql_query_info      = SELECT * FROM tab_objectcollection WHERE id=$id

}


index combinedobject
{
    source              = objectcollection
    path                = /usr/local/sphinx/var/data/objectcollection
    morphology          = stem_en
    min_stemming_len    = 4
    stopwords           = /usr/local/sphinx/var/data/stopwords.txt
    min_word_len        = 3
    min_prefix_len      = 3
    min_infix_len       = 0
    enable_star         = 1
    phrase_boundary = ., ?, !, U+2026 # horizontal ellipsis
    phrase_boundary_step = 100
    html_strip = 1

}


indexer
{
        # memory limit, in bytes, kiloytes (16384K) or megabytes (256M)
        # optional, default is 32M, max is 2047M, recommended is 256M to 1024M
        mem_limit = 256M

        # maximum xmlpipe2 field length, bytes
        # optional, default is 2M
        #
        max_xmlpipe2_field = 16M


        # write buffer size, bytes
        # several (currently up to 4) buffers will be allocated
        # write buffers are allocated in addition to mem_limit
        # optional, default is 1M
        #
        #write_buffer = 16M
}

searchd
{
    listen              = 3312
    max_matches         = 10000
    log                 = /usr/local/sphinx/var/log/searchd.log
    query_log           = /usr/local/sphinx/var/log/query.log
    pid_file            = /usr/local/sphinx/var/log/searchd.pid
}

Thanks

  • 写回答

4条回答 默认 最新

  • dousuo2812 2012-05-12 22:03
    关注

    Have you

    1. Actully built the index - ie called 'indexer' program, to make the index files.
    2. Started the Search Daemon - searchd
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 ansys fluent计算闪退
  • ¥15 有关wireshark抓包的问题
  • ¥15 需要写计算过程,不要写代码,求解答,数据都在图上
  • ¥15 向数据表用newid方式插入GUID问题
  • ¥15 multisim电路设计
  • ¥20 用keil,写代码解决两个问题,用库函数
  • ¥50 ID中开关量采样信号通道、以及程序流程的设计
  • ¥15 U-Mamba/nnunetv2固定随机数种子
  • ¥15 vba使用jmail发送邮件正文里面怎么加图片
  • ¥15 vb6.0如何向数据库中添加自动生成的字段数据。