MVA rt indexes

#5 · open · 4 comments

View on GitHub ↗

romanoff

At the moment oedipus fails to create RT indexes for MVA attributes. Here is an example: connection[:products].replace(4, {category_ids: [3,4]}) would have to produce following query: REPLACE INTO products (id, category_ids) VALUES ('4', (3,4)); But it produces something like this: REPLACE INTO products (id, category_ids) VALUES ('4', '[3,4]'); (as I understand) and I get non-MVA value specified for a MVA column. It's possible to get around that and make this query by executing connection.execute, but would be better if oedipus could handle that. Wanted to make pull request, but seems like changes in C code are required to make it work.

Comments

d11wtq

Oh, yes, I should be able to make that work. What format does Sphinx give the MVAs back in? `(3, 4)`? I'll make some time later today to look at this, thanks.

romanoff

Here is select MVAs query. Hope it helps ``` mysql> select category_ids from products; +--------------+ | category_ids | +--------------+ | 1,2,3 | | 3,4 | | | +--------------+ 3 rows in set (0.00 sec) ```

tylr

Is there any progress on this? I'm currently migrating from an internal solution to oedipus. This is the biggest snag we've run into so far.

tylr

Hey @romanoff and @d11wtq I added support for MVAs in the internet `into` method. This is how the query is built for REPLACE and INSERT. I also have tests passing. I know there is more to be done in order to fully support MVAs. Unfortunately, I won't be able to get around to it for at least a few days. I'll open a pull request anyway. Also, my code also fixes the issue with OS X and certain versions of mysql. I can yank if needed.