sphinx - 致命 : no indexes found in config file

标签 sphinx indexer

我正在尝试运行我的 sphinx 服务器的索引器。

这是我用来启动索引的命令(通过 root 访问):

indexer --all

当我使用命令时,这是我得到的响应:

Sphinx 2.1.9-id64-release (rel21-r4761)
Copyright (c) 2001-2014, Andrew Aksyonoff
Copyright (c) 2008-2014, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/etc/sphinxsearch/sphinx.conf'...
FATAL: no indexes found in config file '/etc/sphinxsearch/sphinx.conf'

这是位于 /etc/sphinxsearch/

中的 sphinx.conf 文件
#############################################################################
## indexer settings
#############################################################################

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

#############################################################################
## searchd settings
#############################################################################

searchd
{
    listen          = 127.0.0.1:9312
    listen          = 127.0.0.1:9306:mysql41
    log         = /var/log/sphinxsearch/searchd.log
    query_log       = /var/log/sphinxsearch/query.log
    read_timeout        = 5
    client_timeout      = 300
    max_children        = 30
    pid_file        = /var/log/sphinxsearch/searchd.pid
    max_matches     = 1000
    seamless_rotate     = 1
    preopen_indexes     = 1
    unlink_old      = 1
    mva_updates_pool    = 1M
    max_packet_size     = 8M
    max_filters     = 256
    max_filter_values   = 4096
    workers         = threads # for RT to work
}

index myindex
{
    type = rt
    path = /var/www/vhosts/user/sphinx/myindex
    rt_field = description
    rt_field = searchcode
    rt_field = weight
    rt_field = productid
    rt_attr_uint = stockproduct
    rt_attr_uint = instock
    charset_type    = utf-8
    min_infix_len   = 3
    enable_star     = 1
    expand_keywords = 1
    dict            = keywords
}

# --eof--

谁能帮我解决这个错误?

致命:在配置文件 '/etc/sphinxsearch/sphinx.conf 中找不到索引

最佳答案

indexer 命令仅适用于传统磁盘索引。不是实时索引。

因为 indexer 不会对 type=rt 做任何事情,它不会“看到”它们,因此您的配置文件没有可索引的索引。

我猜在一个理想的世界里,它会说“没有找到普通索引”或类似的东西来澄清它忽略 rt(与它忽略分布式相同)

关于sphinx - 致命 : no indexes found in config file,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29144669/

相关文章:

php - 使用文本/字符串值在 Sphinx 中创建过滤器

elasticsearch - Sphinx:如何更改默认排名方法?

c++ - Eclipse 3.7 无法解析 C++ 编辑器中的类型

mysql - sphinx 搜索 : joining 3 tables

text - 如何从 Sphinx 结果返回特定字段?

ruby-on-rails - rake 任务已中止,Thinking Sphinx的未定义方法 'indexes'?

language-agnostic - 类似于 Google 代码搜索的源代码索引器和可视化器

c++ - Eclipse CDT : nothing could be resolved?

c# - 在 C# 中将索引器作为参数传递

eclipse-cdt - Eclipse CDT 索引器 - 如何解决未解析的包含