Some comments on the sphinxse ideas.

The way that the mysql sphinxse "storage engine" works is:

You build your index in sphinx.. the index can index documents, database table fields or whatever.

You create a table that has a connection to the searchd.

From the sphinxse docs..
http://sphinxsearch.com/docs/manual-0.9.9.html#sphinxse-overview

CREATE TABLE t1
(
    id          INTEGER UNSIGNED NOT NULL,
    weight      INTEGER NOT NULL,
    query       VARCHAR(3072) NOT NULL,
    group_id    INTEGER,
    INDEX(query)
) ENGINE=SPHINX CONNECTION="sphinx://localhost:9312/test";


You query against the index by using a where clause.

The where clause does reflect the table structure somewhat..

SELECT * FROM t1 WHERE query='test it;mode=any';

but it also includes some modifiers.. not the ;mode=any .

This leads to some queries that might look like this..

WHERE query='test;sort=extended:@weight desc, group_id asc';

Also the "table" has some requirements..

First 3 columns of search table must have a types of INTEGER UNSINGED or BIGINT for the 1st column (document id), INTEGER or BIGINT for the 2nd column (match weight), and VARCHAR or TEXT for the 3rd column (your query), respectively. This mapping is fixed; you can not omit any of these three required columns, or move them around, or change types. Also, query column must be indexed; all the others must be kept unindexed. Columns' names are ignored so you can use arbitrary ones.

I just want to make sure that the core drizzle team is aware of the current MySQL implementation of sphinxse, and if they are happy with the interface, or if they might have ways to make it better. For example I am not sure how the sphinxse handles queries that are not supported or not in the preferred syntax? What happens if we try to update or delete? Or alter table, or column names that do not follow the sphinx standard.

There might be a better way to map some of the sphinx functionality to the SQL statement. There might be a better way to "pushdown" the parameters to the engine, there might be a better way to calculate order of table joins for sphinxse and regular tables. I have never looked at what sort of lies sphinxse tells the optimizer, but there might be an opportunity to configure the interface from drizzle to such a non standard data store.

Just some thoughts.

--
Tom



On 30 Mar 2010, at 07:54, ayman bs wrote:

Alright, could you please give an approximation of the difficulty of the task?

Any prerequisites other than C++?

I didn't find the contact details of the persons who worked on the same plugin for MySQL, do you know any?

On Tue, Mar 30, 2010 at 1:56 AM, Stewart Smith <[email protected] > wrote: On Mon, 29 Mar 2010 16:29:45 -0700, Eric Day <[email protected]> wrote:
> Hey! I'm CC'ing the main drizzle mailing list so other folks can
> comment. You should probably subscribe to it too.
>
> On Tue, Mar 30, 2010 at 01:22:47AM +0200, ayman bs wrote:
> > I have already a familiarity with both drizzle and Sphinx, but I have
> >    never dived into the code level.
> >
> > I would like to know from your point of view the biggest challenges that
> >    might face me in the porting phase...
>
> I'm not as familiar with all the SE interface changes as the other
> developers, so I'll let them comment on the specifics.

DDL: completely different.
transactions: completely different: we (mostly) have
startTransaction/endTransaction and friends
Glue (the bits for registering a plugin/storage engine etc): completely
different.

the rnd_init,rnd_next,index_init bits.... pretty similar unfortunately.

--
Stewart Smith

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Tom Hanlon
[email protected]
Cloudera Certified Hadoop Developer
Certified MySQL DBA


_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to