Distributed index not working

manticore_issues_f259_pic_1
Имеется конфигурация индексов товаров и рубрик использующих эти товары.
На рисунке 1 показаны 4 plain индекса, которые в кач-ве источника используют csv файлы.
На рисунке 2 показаны 6 distributed индексов, которые в кач-ве источника используют либо индекс/ы товаров, либо индекс/ы других рубрик. На данном рисунке 2 цветом обозначены рубрики, которые в кач-ве источника используют индексы товаров такого же цвета.
По непонятной мне причине не создаются индексы для родительских рубрик 4K UHD и TV.

Ниже выкладываю bash скрипт, который быстро позволит создать такую же конфигурацию, создаст csv файлы. Используется официальный докер-образ и docker-compose для удобства работы с ним). Получится такая структура:

├── csv
│   ├── fullhd-tv.csv
│   ├── promotion-tv.csv
│   ├── smart-tv.csv
│   └── wifi-tv.csv
├── data
├── docker-compose.yml
├── manticore.conf
#!/bin/bash

manticore_issues_f259_config="searchd
{
    listen = 9306:mysql41
    listen = /var/run/mysqld/mysqld.sock:mysql41
    pid_file = /var/run/manticore/searchd.pid
    binlog_path =
    # data_dir = /var/lib/manticore
    log = /var/log/manticore/searchd.log
    query_log_format = sphinxql
}

source products_smarts_tv
{
    type = csvpipe
    csvpipe_delimiter = ,
    csvpipe_command = cat /csv/smart-tv.csv
    csvpipe_field_string = name
}

index products_smarts_tv
{
    type = plain
    source = products_smarts_tv
    path = /var/lib/manticore/products_smarts_tv
}

source products_wifi_tv
{
    type = csvpipe
    csvpipe_delimiter = ,
    csvpipe_command = cat /csv/wifi-tv.csv
    csvpipe_field_string = name
}

index products_wifi_tv
{
    type = plain
    source = products_wifi_tv
    path = /var/lib/manticore/products_wifi_tv
}

source products_fullhd_tv
{
    type = csvpipe
    csvpipe_delimiter = ,
    csvpipe_command = cat /csv/fullhd-tv.csv
    csvpipe_field_string = name
}

index products_fullhd_tv
{
    type = plain
    source = products_fullhd_tv
    path = /var/lib/manticore/products_fullhd_tv
}

source products_promotion_tv
{
    type = csvpipe
    csvpipe_delimiter = ,
    csvpipe_command = cat /csv/promotion-tv.csv
    csvpipe_field_string = name
}

index products_promotion_tv
{
    type = plain
    source = products_promotion_tv
    path = /var/lib/manticore/products_promotion_tv
}

index category_smarts_tv
{
    type = distributed
    local = products_smarts_tv
}

index category_wifi_tv
{
    type = distributed
    local = products_wifi_tv
}

index category_fullhd_tv
{
    type = distributed
    local = products_fullhd_tv
}

index category_promotion_tv
{
    type = distributed
    local = products_promotion_tv
}

index category_4k_tv
{
    type = distributed
    local = category_smarts_tv
    local = category_wifi_tv
    local = category_promotion_tv
}

index category_tv
{
    type = distributed
    local = category_4k_tv
    local = category_fullhd_tv
}
"

manticore_issues_f259_docker_compose="version: '2.2'

services:
  manticore_issues_f259:
    container_name: manticore_issues_f259
    image: manticoresearch/manticore
    restart: always
    ports:
      - 127.0.0.1:9306:9376
    volumes:
      - \${PWD}/data:/var/lib/manticore
      - \${PWD}/csv:/csv
      - \${PWD}/manticore.conf:/etc/manticoresearch/manticore.conf
"
mkdir -p data && mkdir -p csv;

printf "$manticore_issues_f259_config" > manticore.conf &&
printf "$manticore_issues_f259_docker_compose" > docker-compose.yml
printf "1501,NanoCell телевизор LG 55SM8000PLA 55' Ultra HD 4K\n" > csv/smart-tv.csv &&
printf "1502,Телевизор XIAOMI Mi TV 4S 43' Ultra HD 4K\n" > csv/wifi-tv.csv &&
printf "1500,NanoCell телевизор LG 55SM8000PLA 55' Ultra HD 4K\n1502,Телевизор XIAOMI Mi TV 4S 43 43' Ultra HD 4K\n1503,Телевизор SAMSUNG T32E310EX 31.5' FULL HD\n" > csv/promotion-tv.csv &&
printf "1503,Телевизор SAMSUNG T32E310EX 31.5' FULL HD\n" > csv/fullhd-tv.csv;

Запускаем контейнер docker-compose -f docker-compose.yml up и делаем ротацию docker-compose -f docker-compose.yml exec --user manticore manticore_issues_f259 indexer --all --rotate
Теперь подключаемся к sphinxQL командой docker-compose -f docker-compose.yml exec --user manticore manticore_issues_f259 mysql -P9306 -h127.0.0.1 и выполняем следующие команды к серверу:

mysql> reload indexes;
mysql> show tables;
+-----------------------+-------------+
| Index                 | Type        |
+-----------------------+-------------+
| category_fullhd_tv    | distributed |
| category_promotion_tv | distributed |
| category_smarts_tv    | distributed |
| category_wifi_tv      | distributed |
| products_fullhd_tv    | local       |
| products_promotion_tv | local       |
| products_smarts_tv    | local       |
| products_wifi_tv      | local       |
+-----------------------+-------------+

Не могу понять по какой причине здесь нету двух индексов category_4k_tv и category_tv. Хотя для них правила написаны:

index category_4k_tv
{
    type = distributed
    local = category_smarts_tv
    local = category_wifi_tv
    local = category_promotion_tv
}

index category_tv
{
    type = distributed
    local = category_4k_tv
    local = category_fullhd_tv
}

ну проще всего лог демона посмотреть и поискать там сообщения об ощибках или же перезапустить демона с опцией --logdebug и посмотреть в логе демона какаие индексы загружаются.

Но у вас в конфиге ошибка, как мне кажется вы не можете ссылатся на другие дистрибутивные локальные индексы из дистрибутивного индекса. Ну те distributed может сожержать в себе local типа plain \ RT \ percolate \ template или agent - тут может быть уже любой тип индекса.

На sphinx3 такое работало.

Лог запуска демона
[Tue Oct 20 13:16:29.991 2020] [89] watchdog: main process 90 forked ok
[Tue Oct 20 13:16:29.991 2020] [90] DEBUG: StartGlobalWorkpool
[Tue Oct 20 13:16:29.991 2020] [90] listening on all interfaces for mysql, port=9306
[Tue Oct 20 13:16:29.991 2020] [90] listening on UNIX socket /var/run/mysqld/mysqld.sock
[Tue Oct 20 13:16:29.991 2020] [90] DEBUG: 'rt_flush_period' - nothing specified, using default value 36000000000
[Tue Oct 20 13:16:29.991 2020] [92] DEBUG: RotateIndexGreedy for 'products_smarts_tv' invoked
[Tue Oct 20 13:16:29.991 2020] [92] DEBUG: RotateIndexGreedy: new index is readable
[Tue Oct 20 13:16:29.991 2020] [92] DEBUG: RotateIndexGreedy: Current index renamed to .old
[Tue Oct 20 13:16:29.992 2020] [92] DEBUG: RotateIndexGreedy: New renamed to current
[Tue Oct 20 13:16:29.992 2020] [92] DEBUG: RotateIndexGreedy: the old index unlinked
[Tue Oct 20 13:16:29.992 2020] [92] DEBUG: rotating index 'products_smarts_tv': applying other indexes' killlists
[Tue Oct 20 13:16:29.992 2020] [92] DEBUG: rotating index 'products_smarts_tv': applying other indexes' killlists... DONE
[Tue Oct 20 13:16:29.992 2020] [92] DEBUG: rotating index 'products_smarts_tv': apply killlist from this index to other indexes (killlist_target)
[Tue Oct 20 13:16:29.992 2020] [92] DEBUG: rotating index 'products_smarts_tv': apply killlist from this index to other indexes (killlist_target)... DONE
[Tue Oct 20 13:16:29.992 2020] [92] rotating index 'products_smarts_tv': success
[Tue Oct 20 13:16:29.992 2020] [92] DEBUG: RotateIndexGreedy for 'products_wifi_tv' invoked
[Tue Oct 20 13:16:29.992 2020] [92] DEBUG: RotateIndexGreedy: new index is readable
[Tue Oct 20 13:16:29.992 2020] [92] DEBUG: RotateIndexGreedy: Current index renamed to .old
[Tue Oct 20 13:16:29.992 2020] [92] DEBUG: RotateIndexGreedy: New renamed to current
[Tue Oct 20 13:16:29.992 2020] [92] DEBUG: RotateIndexGreedy: the old index unlinked
[Tue Oct 20 13:16:29.992 2020] [92] DEBUG: rotating index 'products_wifi_tv': applying other indexes' killlists
[Tue Oct 20 13:16:29.992 2020] [92] DEBUG: rotating index 'products_wifi_tv': applying other indexes' killlists... DONE
[Tue Oct 20 13:16:29.992 2020] [92] DEBUG: rotating index 'products_wifi_tv': apply killlist from this index to other indexes (killlist_target)
[Tue Oct 20 13:16:29.992 2020] [92] DEBUG: rotating index 'products_wifi_tv': apply killlist from this index to other indexes (killlist_target)... DONE
[Tue Oct 20 13:16:29.992 2020] [92] rotating index 'products_wifi_tv': success
[Tue Oct 20 13:16:29.993 2020] [92] DEBUG: RotateIndexGreedy for 'products_fullhd_tv' invoked
[Tue Oct 20 13:16:29.993 2020] [92] DEBUG: RotateIndexGreedy: new index is readable
[Tue Oct 20 13:16:29.993 2020] [92] DEBUG: RotateIndexGreedy: Current index renamed to .old
[Tue Oct 20 13:16:29.993 2020] [92] DEBUG: RotateIndexGreedy: New renamed to current
[Tue Oct 20 13:16:29.993 2020] [92] DEBUG: RotateIndexGreedy: the old index unlinked
[Tue Oct 20 13:16:29.993 2020] [92] DEBUG: rotating index 'products_fullhd_tv': applying other indexes' killlists
[Tue Oct 20 13:16:29.993 2020] [92] DEBUG: rotating index 'products_fullhd_tv': applying other indexes' killlists... DONE
[Tue Oct 20 13:16:29.993 2020] [92] DEBUG: rotating index 'products_fullhd_tv': apply killlist from this index to other indexes (killlist_target)
[Tue Oct 20 13:16:29.993 2020] [92] DEBUG: rotating index 'products_fullhd_tv': apply killlist from this index to other indexes (killlist_target)... DONE
[Tue Oct 20 13:16:29.993 2020] [92] rotating index 'products_fullhd_tv': success
[Tue Oct 20 13:16:29.993 2020] [92] DEBUG: RotateIndexGreedy for 'products_promotion_tv' invoked
[Tue Oct 20 13:16:29.993 2020] [92] DEBUG: RotateIndexGreedy: new index is readable
[Tue Oct 20 13:16:29.993 2020] [92] DEBUG: RotateIndexGreedy: Current index renamed to .old
[Tue Oct 20 13:16:29.993 2020] [92] DEBUG: RotateIndexGreedy: New renamed to current
[Tue Oct 20 13:16:29.994 2020] [92] DEBUG: RotateIndexGreedy: the old index unlinked
[Tue Oct 20 13:16:29.994 2020] [92] DEBUG: rotating index 'products_promotion_tv': applying other indexes' killlists
[Tue Oct 20 13:16:29.994 2020] [92] DEBUG: rotating index 'products_promotion_tv': applying other indexes' killlists... DONE
[Tue Oct 20 13:16:29.994 2020] [92] DEBUG: rotating index 'products_promotion_tv': apply killlist from this index to other indexes (killlist_target)
[Tue Oct 20 13:16:29.994 2020] [92] DEBUG: rotating index 'products_promotion_tv': apply killlist from this index to other indexes (killlist_target)... DONE
[Tue Oct 20 13:16:29.994 2020] [92] rotating index 'products_promotion_tv': success
[Tue Oct 20 13:16:29.994 2020] [92] WARNING: index 'category_4k_tv': no such local index 'category_smarts_tv', SKIPPED
[Tue Oct 20 13:16:29.994 2020] [92] WARNING: index 'category_4k_tv': no such local index 'category_wifi_tv', SKIPPED
[Tue Oct 20 13:16:29.994 2020] [92] WARNING: index 'category_4k_tv': no such local index 'category_promotion_tv', SKIPPED
[Tue Oct 20 13:16:29.994 2020] [92] WARNING: index 'category_4k_tv': index 'category_4k_tv': no valid local/remote indexes in distributed index - NOT SERVING
[Tue Oct 20 13:16:29.994 2020] [92] WARNING: index 'category_tv': no such local index 'category_4k_tv', SKIPPED
[Tue Oct 20 13:16:29.994 2020] [92] WARNING: index 'category_tv': no such local index 'category_fullhd_tv', SKIPPED
[Tue Oct 20 13:16:29.994 2020] [92] WARNING: index 'category_tv': index 'category_tv': no valid local/remote indexes in distributed index - NOT SERVING
[Tue Oct 20 13:16:29.995 2020] [90] DEBUG: expression stack delta 1
[Tue Oct 20 13:16:29.995 2020] [90] DEBUG: 'binlog_max_log_size' - nothing specified, using default value 268435456
[Tue Oct 20 13:16:29.995 2020] [90] DEBUG: MAC address 02:42:ac:1f:00:02 for uuid-short server_id
[Tue Oct 20 13:16:29.995 2020] [90] DEBUG: uid-short server_id 11, started 46530989, seed 793414194870353920
[Tue Oct 20 13:16:29.995 2020] [90] accepting connections
[Tue Oct 20 13:16:29.997 2020] [91] prereading 4 indexes
[Tue Oct 20 13:16:29.997 2020] [91] DEBUG: prereading index 'products_smarts_tv'
[Tue Oct 20 13:16:29.997 2020] [91] DEBUG: CSphIndex_VLN::Preread invoked 'products_smarts_tv'(/var/lib/manticore/products_smarts_tv)
[Tue Oct 20 13:16:29.997 2020] [91] DEBUG: Preread successfully finished
[Tue Oct 20 13:16:29.997 2020] [91] DEBUG: prereaded index 'products_smarts_tv' in 0.000 sec
[Tue Oct 20 13:16:29.997 2020] [91] DEBUG: prereading index 'products_wifi_tv'
[Tue Oct 20 13:16:29.997 2020] [91] DEBUG: CSphIndex_VLN::Preread invoked 'products_wifi_tv'(/var/lib/manticore/products_wifi_tv)
[Tue Oct 20 13:16:29.997 2020] [91] DEBUG: Preread successfully finished
[Tue Oct 20 13:16:29.997 2020] [91] DEBUG: prereaded index 'products_wifi_tv' in 0.000 sec
[Tue Oct 20 13:16:29.997 2020] [91] DEBUG: prereading index 'products_fullhd_tv'
[Tue Oct 20 13:16:29.997 2020] [91] DEBUG: CSphIndex_VLN::Preread invoked 'products_fullhd_tv'(/var/lib/manticore/products_fullhd_tv)
[Tue Oct 20 13:16:29.997 2020] [91] DEBUG: Preread successfully finished
[Tue Oct 20 13:16:29.997 2020] [91] DEBUG: prereaded index 'products_fullhd_tv' in 0.000 sec
[Tue Oct 20 13:16:29.997 2020] [91] DEBUG: prereading index 'products_promotion_tv'
[Tue Oct 20 13:16:29.997 2020] [91] DEBUG: CSphIndex_VLN::Preread invoked 'products_promotion_tv'(/var/lib/manticore/products_promotion_tv)
[Tue Oct 20 13:16:29.997 2020] [91] DEBUG: Preread successfully finished
[Tue Oct 20 13:16:29.997 2020] [91] DEBUG: prereaded index 'products_promotion_tv' in 0.000 sec
[Tue Oct 20 13:16:29.997 2020] [91] prereaded 4 indexes in 0.000 sec
Лог ротации демона
[Tue Oct 20 13:18:05.002 2020] [90] caught SIGHUP (seamless=1, in_rotate=0, need_rotate=0)
[Tue Oct 20 13:18:05.003 2020] [96] DEBUG: CheckRotate invoked
[Tue Oct 20 13:18:05.003 2020] [93] rotating index 'products_promotion_tv': started
[Tue Oct 20 13:18:05.003 2020] [93] DEBUG: prealloc enough RAM and lock new index
[Tue Oct 20 13:18:05.003 2020] [93] DEBUG: Locking the index via file /var/lib/manticore/products_promotion_tv.new.spl
[Tue Oct 20 13:18:05.003 2020] [93] DEBUG: lock /var/lib/manticore/products_promotion_tv.new.spl success
[Tue Oct 20 13:18:05.003 2020] [93] DEBUG: CSphIndex_VLN::Preread invoked 'products_promotion_tv'(/var/lib/manticore/products_promotion_tv.new)
[Tue Oct 20 13:18:05.003 2020] [93] DEBUG: Preread successfully finished
[Tue Oct 20 13:18:05.003 2020] [93] DEBUG: activate new index
[Tue Oct 20 13:18:05.003 2020] [93] DEBUG: rotating index 'products_promotion_tv': applying other indexes' killlists
[Tue Oct 20 13:18:05.003 2020] [93] DEBUG: rotating index 'products_promotion_tv': applying other indexes' killlists... DONE
[Tue Oct 20 13:18:05.003 2020] [93] DEBUG: all went fine; swap them
[Tue Oct 20 13:18:05.003 2020] [93] rotating index 'products_promotion_tv': success
[Tue Oct 20 13:18:05.003 2020] [93] DEBUG: rotating index 'products_promotion_tv': apply killlist from this index to other indexes (killlist_target)
[Tue Oct 20 13:18:05.003 2020] [93] DEBUG: rotating index 'products_promotion_tv': apply killlist from this index to other indexes (killlist_target)... DONE
[Tue Oct 20 13:18:05.003 2020] [93] DEBUG: unlink /var/lib/manticore/products_promotion_tv.old
[Tue Oct 20 13:18:05.003 2020] [93] rotating index 'products_fullhd_tv': started
[Tue Oct 20 13:18:05.003 2020] [93] DEBUG: prealloc enough RAM and lock new index
[Tue Oct 20 13:18:05.004 2020] [93] DEBUG: Locking the index via file /var/lib/manticore/products_fullhd_tv.new.spl
[Tue Oct 20 13:18:05.004 2020] [93] DEBUG: lock /var/lib/manticore/products_fullhd_tv.new.spl success
[Tue Oct 20 13:18:05.004 2020] [93] DEBUG: CSphIndex_VLN::Preread invoked 'products_fullhd_tv'(/var/lib/manticore/products_fullhd_tv.new)
[Tue Oct 20 13:18:05.004 2020] [93] DEBUG: Preread successfully finished
[Tue Oct 20 13:18:05.004 2020] [93] DEBUG: activate new index
[Tue Oct 20 13:18:05.004 2020] [93] DEBUG: rotating index 'products_fullhd_tv': applying other indexes' killlists
[Tue Oct 20 13:18:05.004 2020] [93] DEBUG: rotating index 'products_fullhd_tv': applying other indexes' killlists... DONE
[Tue Oct 20 13:18:05.004 2020] [93] DEBUG: all went fine; swap them
[Tue Oct 20 13:18:05.004 2020] [93] rotating index 'products_fullhd_tv': success
[Tue Oct 20 13:18:05.004 2020] [93] DEBUG: rotating index 'products_fullhd_tv': apply killlist from this index to other indexes (killlist_target)
[Tue Oct 20 13:18:05.004 2020] [93] DEBUG: rotating index 'products_fullhd_tv': apply killlist from this index to other indexes (killlist_target)... DONE
[Tue Oct 20 13:18:05.004 2020] [93] DEBUG: unlink /var/lib/manticore/products_fullhd_tv.old
[Tue Oct 20 13:18:05.004 2020] [93] rotating index 'products_wifi_tv': started
[Tue Oct 20 13:18:05.004 2020] [93] DEBUG: prealloc enough RAM and lock new index
[Tue Oct 20 13:18:05.004 2020] [93] DEBUG: Locking the index via file /var/lib/manticore/products_wifi_tv.new.spl
[Tue Oct 20 13:18:05.004 2020] [93] DEBUG: lock /var/lib/manticore/products_wifi_tv.new.spl success
[Tue Oct 20 13:18:05.004 2020] [93] DEBUG: CSphIndex_VLN::Preread invoked 'products_wifi_tv'(/var/lib/manticore/products_wifi_tv.new)
[Tue Oct 20 13:18:05.004 2020] [93] DEBUG: Preread successfully finished
[Tue Oct 20 13:18:05.004 2020] [93] DEBUG: activate new index
[Tue Oct 20 13:18:05.005 2020] [93] DEBUG: rotating index 'products_wifi_tv': applying other indexes' killlists
[Tue Oct 20 13:18:05.005 2020] [93] DEBUG: rotating index 'products_wifi_tv': applying other indexes' killlists... DONE
[Tue Oct 20 13:18:05.005 2020] [93] DEBUG: all went fine; swap them
[Tue Oct 20 13:18:05.005 2020] [93] rotating index 'products_wifi_tv': success
[Tue Oct 20 13:18:05.005 2020] [93] DEBUG: rotating index 'products_wifi_tv': apply killlist from this index to other indexes (killlist_target)
[Tue Oct 20 13:18:05.005 2020] [93] DEBUG: rotating index 'products_wifi_tv': apply killlist from this index to other indexes (killlist_target)... DONE
[Tue Oct 20 13:18:05.005 2020] [93] DEBUG: unlink /var/lib/manticore/products_wifi_tv.old
[Tue Oct 20 13:18:05.005 2020] [93] rotating index 'products_smarts_tv': started
[Tue Oct 20 13:18:05.005 2020] [93] DEBUG: prealloc enough RAM and lock new index
[Tue Oct 20 13:18:05.005 2020] [93] DEBUG: Locking the index via file /var/lib/manticore/products_smarts_tv.new.spl
[Tue Oct 20 13:18:05.005 2020] [93] DEBUG: lock /var/lib/manticore/products_smarts_tv.new.spl success
[Tue Oct 20 13:18:05.005 2020] [93] DEBUG: CSphIndex_VLN::Preread invoked 'products_smarts_tv'(/var/lib/manticore/products_smarts_tv.new)
[Tue Oct 20 13:18:05.005 2020] [93] DEBUG: Preread successfully finished
[Tue Oct 20 13:18:05.005 2020] [93] DEBUG: activate new index
[Tue Oct 20 13:18:05.005 2020] [93] DEBUG: rotating index 'products_smarts_tv': applying other indexes' killlists
[Tue Oct 20 13:18:05.005 2020] [93] DEBUG: rotating index 'products_smarts_tv': applying other indexes' killlists... DONE
[Tue Oct 20 13:18:05.005 2020] [93] DEBUG: all went fine; swap them
[Tue Oct 20 13:18:05.005 2020] [93] rotating index 'products_smarts_tv': success
[Tue Oct 20 13:18:05.005 2020] [93] DEBUG: rotating index 'products_smarts_tv': apply killlist from this index to other indexes (killlist_target)
[Tue Oct 20 13:18:05.005 2020] [93] DEBUG: rotating index 'products_smarts_tv': apply killlist from this index to other indexes (killlist_target)... DONE
[Tue Oct 20 13:18:05.005 2020] [93] DEBUG: unlink /var/lib/manticore/products_smarts_tv.old
[Tue Oct 20 13:18:05.006 2020] [93] rotating index: all indexes done
Лог ротации (не демона)
UID=1000 GID=1000 docker-compose -f docker-compose.yml exec --user manticore manticore_issues_f259 indexer --all --rotate
Manticore 3.5.2 226a38d4@201006 release
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-2020, Manticore Software LTD (http://manticoresearch.com)

using config file '/etc/manticoresearch/manticore.conf'...
indexing index 'products_smarts_tv'...
collected 1 docs, 0.0 MB
creating lookup: 0.0 Kdocs, 100.0% done
creating histograms: 0.0 Kdocs, 100.0% done
sorted 0.0 Mhits, 100.0% done
total 1 docs, 58 bytes
total 0.031 sec, 1863 bytes/sec, 32.12 docs/sec
indexing index 'products_wifi_tv'...
collected 1 docs, 0.0 MB
creating lookup: 0.0 Kdocs, 100.0% done
creating histograms: 0.0 Kdocs, 100.0% done
sorted 0.0 Mhits, 100.0% done
total 1 docs, 50 bytes
total 0.031 sec, 1607 bytes/sec, 32.15 docs/sec
indexing index 'products_fullhd_tv'...
collected 1 docs, 0.0 MB
creating lookup: 0.0 Kdocs, 100.0% done
creating histograms: 0.0 Kdocs, 100.0% done
sorted 0.0 Mhits, 100.0% done
total 1 docs, 50 bytes
total 0.031 sec, 1610 bytes/sec, 32.21 docs/sec
indexing index 'products_promotion_tv'...
collected 3 docs, 0.0 MB
creating lookup: 0.0 Kdocs, 100.0% done
creating histograms: 0.0 Kdocs, 100.0% done
sorted 0.0 Mhits, 100.0% done
total 3 docs, 161 bytes
total 0.031 sec, 5183 bytes/sec, 96.58 docs/sec
skipping non-plain index 'category_smarts_tv'...
skipping non-plain index 'category_wifi_tv'...
skipping non-plain index 'category_fullhd_tv'...
skipping non-plain index 'category_promotion_tv'...
skipping non-plain index 'category_4k_tv'...
skipping non-plain index 'category_tv'...
total 16 reads, 0.000 sec, 8.0 kb/call avg, 0.0 msec/call avg
total 60 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
rotating indices: successfully sent SIGHUP to searchd (pid=90).

Process finished with exit code 0

Если так не должно работать, и вообще является неправильным, то какой вообще best way для кейса, когда у нас:

  • > 3 млн товаров
  • Большое дерево рубрик
  • Все родительские рубрики должны иметь товары дочерних рубрик

Я вижу ещё один вариант, это - один большой индекс products в котором есть JSON-поле categories в ID всех рубрик, в которых есть данный товар (включая все родительские рубрики).
Но что-то мне думается, запросы к индексу в котором > 3 млн товаров с включённым фильтром по JSON полю categories будет отрабатывать в разы медленее, чем отдельный индекс с этой рубрикой

я бы сначала проверил лог демона и убедился в наличае ошибок

По Вашей рекомендации я запустил демона с опцией дебага (выше в сообщениях их выложил). Там ничего интересного нету в логах от демона. Более того, там вообще нет ни слова об индексах рубрик, только о товарах. Как так?

А вот в логе ротации есть интересные сообщения:

skipping non-plain index 'category_smarts_tv'...
skipping non-plain index 'category_wifi_tv'...
skipping non-plain index 'category_fullhd_tv'...
skipping non-plain index 'category_promotion_tv'...
skipping non-plain index 'category_4k_tv'...
skipping non-plain index 'category_tv'...

Почему он их пропускает - понятия не имею…
Пропустил, но в то же время 4 индекса рубрик создал:

mysql> show tables;
show tables;
+-----------------------+-------------+
| Index                 | Type        |
+-----------------------+-------------+
| category_fullhd_tv    | distributed |
| category_promotion_tv | distributed |
| category_smarts_tv    | distributed |
| category_wifi_tv      | distributed |
| products_fullhd_tv    | local       |
| products_promotion_tv | local       |
| products_smarts_tv    | local       |
| products_wifi_tv      | local       |
+-----------------------+-------------+
mysql> select * from category_fullhd_tv;
select * from category_fullhd_tv;
+------+----------------------------------------------------+
| id   | name                                               |
+------+----------------------------------------------------+
| 1503 | Телевизор SAMSUNG T32E310EX 31.5' FULL HD          |
+------+----------------------------------------------------+

Ничего не понимаю!

я не понимаю, что не так - локальные индексы все созданы и работают?

не работают только некоторые distributed? какого типа distributed?

когда в запросе упомянут индекс, он экспандится в список индексов для выполняния запроса, на каждом индексе

  • если индекс, который экспандим, дистирбутивный - то собираем из него список локальных индексов для выполнения запроса и список агентов - для отправки запроса, как есть
  • если индекс локальный - добавляем его в список локальных индексов для обработки запроса

поэтому нет никаких вариантов рекурсии, вложеных дистрибутивных индексов, дистрибутивных инедексов ссылающихся на другие дистрибутивные индексы, дерево индексов, графы индексов и прочего

вы или добавляете локальные индексы в distributed из всех категорий которые вам нужны
или обращаетесь к индексу через agent - тогда запрос будет отправлен по сети и уже на агенте будет произведен экспанд индексов

Спасибо. Теперь дошло. Рекурсия работать не будет.