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?