Search code examples
sphinxindexer

FATAL: no indexes found in config file


I am trying to run the indexer of my sphinx server.

This is the command I use (through root access) to start the indexing:

indexer --all

When I use the command, this is the reponse I get:

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'

This is the sphinx.conf file that is located in /etc/sphinxsearch/

#############################################################################
## 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--

Can someone help me with resolving this error?

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


Solution

  • the indexer command only works on traditional disk-index. Not real time indexes.

    Because indexer doesn't do anything with type=rt it doesnt 'see' them, hence your config file has no indexes to index.

    I guess in an ideal world it would say 'no plain indexes found' or similar to clarify its ignoring rt (same as it ignores distributed)