6.3.6 не работает вызов CALL SUGGEST для agents (решено)

Доброго времени суток!
Есть Manticore:

Server version: 6.3.6 593045790@24080214 (columnar 2.3.0 88a01c3@24052206) (secondary 2.3.0 88a01c3@24052206) (knn 2.3.0 88a01c3@240522
06) git branch manticore-6.3.6…origin/manticore-6.3.6

Используемые node:
Manticore-proxy с настроенными конфигурациями agent под каждый plain-индекс
Manticore-search nodes с plain индексами

Конфигурация на proxy /etc/manticoresearch/conf.d/products_for_autocorrect.conf:

index products_for_autocorrect
{
    type = distributed
    agent = 10.9.2.36|10.9.2.37|10.9.2.38|10.9.2.39:products_for_autocorrect[conn=pconn,ha_strategy=nodeads]
}

Конфигурация на search node /etc/manticoresearch/conf.d/products_for_autocorrect_index.conf:

index products_for_autocorrect
{
    type = plain
    source = products_for_autocorrect
    path  = /var/lib/manticore/indexes/products_for_autocorrect/products_for_autocorrect

    # options
    min_prefix_len = 2
    index_exact_words = 1
    charset_table = 0..9, A..Z->a..z, _, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F, U+0401->U+0435, U+0451->U+0435, U+401->U+0435, U+451->U+0435
    ignore_chars = U+002E, U+005C
    expand_keywords = 1
    min_infix_len = 2
    # options end

}

Индексы на search nodes:

mysql> show tables;
+-------------------------------+-------+
| Index                         | Type  |
+-------------------------------+-------+
| bindings                      | local |
| categories                    | local |
| ekns                          | local |
| literature_work_cycle_volumes | local |
| literature_work_cycles        | local |
| persons                       | local |
| product_collections           | local |
| product_properties_values     | local |
| product_tags                  | local |
| products                      | local |
| products_for_autocorrect      | local |
| publisher_brands              | local |
| publisher_series              | local |
| publishers                    | local |
| shops                         | local |
| tbks                          | local |
+-------------------------------+-------+
16 rows in set (0,00 sec)

Схема products_for_autocorrect:

mysql> desc products_for_autocorrect;
+-----------------------+--------+--------------------------+
| Field                 | Type   | Properties               |
+-----------------------+--------+--------------------------+
| id                    | bigint |                          |
| author_full_name_list | string | indexed stored attribute |
| publisher_series_name | string | indexed stored attribute |
| publisher_name        | string | indexed stored attribute |
| publisher_brand_name  | string | indexed stored attribute |
| school_umk_title      | string | indexed stored attribute |
+-----------------------+--------+--------------------------+
6 rows in set (0,01 sec)

Индексы на proxy:

mysql> show tables;
+-------------------------------+-------------+
| Index                         | Type        |
+-------------------------------+-------------+
| bindings                      | distributed |
| categories                    | distributed |
| ekns                          | distributed |
| literature_work_cycle_volumes | distributed |
| literature_work_cycles        | distributed |
| persons                       | distributed |
| product_collections           | distributed |
| product_properties_values     | distributed |
| product_tags                  | distributed |
| products                      | distributed |
| products_for_autocorrect      | distributed |
| publisher_brands              | distributed |
| publisher_series              | distributed |
| publishers                    | distributed |
| shops                         | distributed |
| tbks                          | distributed |
+-------------------------------+-------------+
16 rows in set (0,00 sec)

mysql> desc products_for_autocorrect;
+-----------------------------------------+-------------------+
| Agent                                   | Type              |
+-----------------------------------------+-------------------+
| 10.9.2.36:9312:products_for_autocorrect | remote_1_mirror_1 |
| 10.9.2.37:9312:products_for_autocorrect | remote_1_mirror_2 |
| 10.9.2.38:9312:products_for_autocorrect | remote_1_mirror_3 |
| 10.9.2.39:9312:products_for_autocorrect | remote_1_mirror_4 |
+-----------------------------------------+-------------------+
4 rows in set (0,00 sec)

Делаю запрос CALL SUGGEST на proxy:

mysql> CALL SUGGEST('пфтница', 'products_for_autocorrect', 1 as non_char);
ERROR 1064 (42000): no such table products_for_autocorrect

Этот же запрос CALL SUGGEST на любой search node:

mysql> CALL SUGGEST('пфтница', 'products_for_autocorrect', 1 as non_char);
+------------------+----------+------+
| suggest          | distance | docs |
+------------------+----------+------+
| пятница          | 1        | 26   |
| птица            | 2        | 763  |
| путаница         | 2        | 24   |
| битника          | 3        | 110  |
| граница          | 3        | 74   |
+------------------+----------+------+
5 rows in set (0,00 sec)

А теперь с CALL KEYWORDS на proxy:

mysql> CALL KEYWORDS('пфтница', 'products_for_autocorrect');
+------+----------------+----------------+
| qpos | tokenized      | normalized     |
+------+----------------+----------------+
| 1    | пфтница        | пфтница        |
+------+----------------+----------------+
1 row in set (0,00 sec)

Этот же запрос CALL KEYWORDS на любой search node:

mysql> CALL KEYWORDS('пфтница', 'products_for_autocorrect');
+------+----------------+----------------+
| qpos | tokenized      | normalized     |
+------+----------------+----------------+
| 1    | пфтница        | пфтница        |
+------+----------------+----------------+
1 row in set (0,00 sec)

Вопрос - что ему не так?

call suggest для distributed index была реализована только в версии 7.0
https://manual.manticoresearch.com/dev/Changelog#Minor-changes

вам нужно использовать последний релиз, чтобы использовать эту функциональность

1 Like

Вот как, понял. Спасибо. Будем тестировать.

Выполнил upgrade с чистой установкой.
Проверил работу на proxy:

mysql> show tables;
+-------------------------------+-------------+
| Table                         | Type        |
+-------------------------------+-------------+
| bindings                      | distributed |
| categories                    | distributed |
| ekns                          | distributed |
| literature_work_cycle_volumes | distributed |
| literature_work_cycles        | distributed |
| persons                       | distributed |
| product_collections           | distributed |
| product_properties_values     | distributed |
| product_tags                  | distributed |
| products                      | distributed |
| products_for_autocorrect      | distributed |
| publisher_brands              | distributed |
| publisher_series              | distributed |
| publishers                    | distributed |
| shops                         | distributed |
| tbks                          | distributed |
+-------------------------------+-------------+
16 rows in set (0,00 sec)

mysql> select count(*) from products_for_autocorrect;
+----------+
| count(*) |
+----------+
|  2016551 |
+----------+
1 row in set (0,01 sec)
--- 1 out of 1 results in 6ms ---

mysql> CALL SUGGEST('h5bsrqbi2', 'products_for_autocorrect');
Empty set (0,00 sec)

Работает. Будем тестировать новый релиз.
@tomat спасибо за помощь.