Hi Markus,
thanks for your contribution. Connecting to Sphinx RT index via federatedx
sounds like a great idea.
I reviewed attached patch and from what I can see, relevant difference
between dialects is as following:
1. Connection to RT index doesn't require database name and you made it
optional in parse_url(). That's acceptable with sphinxql scheme, but
with mysql scheme it's a bit ambiguous. What do you think if we keep
database name mandatory and document that connection string to RT index
should look like
sphinxql://root@localhost:9306//rt
or
sphinxql://root@localhost:9306/dummy/rt
2. delete_row(): looks nice, but could be greatly simplified because sphinxql
accepts only record identifier in WHERE clause.
3. delete_all_rows(): FWICS there is "TRUNCATE RTINDEX" statement in sphinx.
Why can't we use it? Even better patch sphinx to make RTINDEX word optional?
4. table_metadata(): I believe it should be easy and natural to patch sphinx to
support SHOW TABLE STATUS. What do you think?
5. query(): Same here, sphinxql shouldn't add implicit limit.
6. test_connection(): What's the problem with test query?
Did I miss anything else?
Thanks,
Sergey
29.05.2013, в 1:46, Markus Lidel
Hello,
the Sphinx Search engine has RT indexes, which could be updated with a subset of SQL commands, refered to as SphinxQL:
http://sphinxsearch.com/docs/2.1.1/sphinxql-reference.html
Because the FederatedX storage engine uses some commands, which Sphinx does not know, here is a patch, wich extends the FederatedX storage engine to support this subset of commands. Now its possible to update Sphinx RT indexes directly from MariaDB. To create a connection to the RT index in the Sphinx default RT-index:
index rt { type = rt
path = @CONFDIR@/data/rt
rt_field = title rt_field = content
rt_attr_string = title rt_attr_string = content
rt_attr_uint = gid }
you just have to call:
CREATE TABLE `rt` ( `id` BIGINT UNSIGNED NOT NULL, `title` TEXT, `content` TEXT, `gid` INT UNSIGNED ) ENGINE=FEDERATED CONNECTION='sphinxql://root@localhost:9306/rt';
It would be great, if the attached patch could be integrated into MariaDB. If you have any suggestions, please feel free to contact me.
Best regards,
Markus Lidel
_______________________________________________ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp