sphinx 查询没找到索引的问题求大佬指点,提示 WARNING: No extra index definitions found in data folder - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
alex321
V2EX    问与答

sphinx 查询没找到索引的问题求大佬指点,提示 WARNING: No extra index definiions found in data folder

  •  
  •   alex321 2018-03-02 16:48:43 +08:00 3447 次点击
    这是一个创建于 2783 天前的主题,其中的信息可能已经有所发展或是发生改变。
    情况是这样的,我用 sphinx 创建了本地索引。
    C:\Users\alex321>"D:\sphinx\bin\indexer.exe" --config "D:\sphinx\bin\sphinx.conf" --all
    Sphinx 3.0.2 (commit 2592786)
    Copyright (c) 2001-2018, Andrew Aksyonoff
    Copyright (c) 2008-2016, Sphinx Technologies Inc ( http://sphinxsearch.com)

    using config file 'D:\sphinx\bin\sphinx.conf'...
    indexing index 'test1'...
    collected 3547 docs, 2.9 MB
    sorted 0.2 Mhits, 100.0% done
    total 3547 docs, 2.943 Mb
    total 0.2 sec, 18.50 Mb/sec, 22302 docs/sec
    skipping non-plain index 'testrt'...

    然后,启动 searchd
    C:\Users\alex321>"D:\sphinx\bin\searchd.exe" --config "D:\sphinx\bin\sphinx.conf"
    Sphinx 3.0.2 (commit 2592786)
    Copyright (c) 2001-2018, Andrew Aksyonoff
    Copyright (c) 2008-2016, Sphinx Technologies Inc ( http://sphinxsearch.com)

    listening on all interfaces, port=9312
    listening on all interfaces, port=9306
    WARNING: No extra index definitions found in data folder
    accepting connections
    prereading 0 indexes
    prereaded 0 indexes in 0.001 sec
    query error: unknown local index 'test1' in search request
    query error: unknown local index 'test1' in search request

    实际看到 data 目录下是有 test1 开头的多个文件的。
    test1.sha
    test1.spa
    test1.spd
    test1.spe
    test1.sph
    test1.spi
    test1.spj
    test1.spk
    test1.spp

    然后,sphinx.conf 文件是直接拿 etc 下的 mini 进行修改的。
    #
    # Minimal Sphinx configuration sample (clean, simple, functional)
    #

    source src1
    {
    type = mysql

    sql_host = localhost
    sql_user = test
    sql_pass = test
    sql_db = test
    sql_port = 3306 # optional, default is 3306

    sql_query = 查询语句

    sql_attr_uint = id
    sql_attr_timestamp = time

    sql_query_pre = SET NAMES utf8
    }


    index test1
    {
    source = src1
    path = D:\sphinx\data\test1
    }


    index testrt
    {
    type = rt
    rt_mem_limit = 128M

    path = D:\sphinx\data\testrt

    rt_field = title
    rt_field = content
    rt_attr_uint = gid
    }


    indexer
    {
    mem_limit = 128M
    }


    searchd
    {
    listen = 9312
    listen = 9306:mysql41
    log = D:\sphinx\log\searchd.log
    query_log = log/query.log
    read_timeout = 5
    max_children = 30
    pid_file = D:\sphinx\log\searchd.pid
    seamless_rotate = 1
    preopen_indexes= 1
    unlink_old = 1
    workers = threads # for RT to work
    binlog_path = data
    }
    3 条回复    2018-08-31 17:40:02 +08:00
    zqunor1995
        1
    zqunor1995  
       2018-07-18 20:31:32 +08:00
    请问楼主解决这个问题了吗?我也是这个问题,找不到问题的根源,
    WongYukloong
        2
    WongYukloong  
       2018-08-31 17:22:14 +08:00
    请问楼主解决这个问题了吗?我也是这个问题,找不到问题的根源
    WongYukloong
        3
    WongYukloong  
       2018-08-31 17:40:02 +08:00
    @zqunor1995 在 sphinx.conf 中的 searchd 里面把 binlog_path 注释掉就好了。
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     1041 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 26ms UTC 18:35 PVG 02:35 LAX 11:35 JFK 14:35
    Do have faith in what you're doing.
    ubao snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86