FEDERATED and multiple indexes

After testing out accessing Manticore via FEDERATED tables in mysql, I’ve come to a problem. It seems each indexes may be accessed only one at a time. That is, each index has its individual table in mysql. The index is hardcoded in the table’s CONNECTION string. In fact, the index passed in the query string is ignored.

For example, if I have the following table:

CREATE TABLE Y2017 (
id int(10) unsigned NOT NULL,
query varchar(3072) NOT NULL,
KEY query (query(1024))
) ENGINE=FEDERATED DEFAULT CHARSET=utf8 CONNECTION=‘mysql://FEDERATED@10.0.0.46:9309/DB/Y2017’

The following request will still succeed:
SELECT * FROM manticore.Y2017 WHERE query=“select * from NOTANINDEX where match(‘honk’)”;

Which leads me to my next problem : my setup has 52 indexes, so rewriting my query (I used mysqlse previously) to use joins would be very wasteful, with potentially 52 queries to searchd and joining and slicing happening in mysqld instead of one query to searchd with slicing happening in searchd.

Is this a design choice or an oversight?

you could create distributed index where to put all your local indexes or agents and query that distributed index Y2017

I was under the impression that I couldn’t access distributed indexes with FEDERATED.

But more importantly, I will only know the exact combination of indexes at run time, so I’d have to create a distributed index for all possible combination of indexes which quickly becomes prohibitive, given that 52! = 8.0658175e+67.

you could create ticket at github with this request to get informed about issue progress