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

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 hexo+github部署博客
  • ¥15 求螺旋焊缝的图像处理
  • ¥15 blast算法(相关搜索:数据库)
  • ¥15 请问有人会紧聚焦相关的matlab知识嘛?
  • ¥15 网络通信安全解决方案
  • ¥50 yalmip+Gurobi
  • ¥20 win10修改放大文本以及缩放与布局后蓝屏无法正常进入桌面
  • ¥15 itunes恢复数据最后一步发生错误
  • ¥15 关于#windows#的问题:2024年5月15日的win11更新后资源管理器没有地址栏了顶部的地址栏和文件搜索都消失了
  • ¥100 H5网页如何调用微信扫一扫功能?