Where define rt_mem_limit with RT mode?

I’m looking into switching from Sphinx to Manticore. I am using RT indexes on Windows (later Centos).

If I define the RT indexes using the CREATE method instead of in the manticore.conf file, where do I specify attributes like charset_table and rt_mem_limit for each index? Normally, I’d put those in the .conf file along with the index definition.

After definition of structure, you can add the index settings separated by space.

CREATE TABLE name (field text, attr1 int, attr2 float) rt_mem_limit=‘2G’ charset_table=‘0…9, english, _’

see https://docs.manticoresearch.com/latest/html/sphinxql_reference/create_table_syntax.html

1 Like

Thanks! Can I change these attributes on the fly, for example, if I want to add more RAM later? I don’t see a MODIFY option, so I’m guessing not…

There’s ALTER and alter table t rt_mem_limit='1G' even doesn’t return any error, but it is not supported internally yet.

I’ve created an issue on Github about it https://github.com/manticoresoftware/manticoresearch/issues/344 . Subscribe to it to be informed about the status.

after:
MySQL [(none)]> ALTER TABLE news_rt rt_mem_limit='512M';
I’ve got an error:
ERROR 1064 (42000): sphinxql: syntax error, unexpected TEXT, expecting IDENT or TYPE near 'text text indexed ) min_infix_len='2' ignore_chars='U+0027, U+02BC, U+2019''

@Artemco What does SHOW CREATE TABLE news_rt return and what’s the version of Manticore?

Never mind. I’ve reproduced it in the latest version:

MRE

mysql> drop table if exists t; create table t(`text` text); desc t; alter table t rt_mem_limit='512M';
--------------
drop table if exists t
--------------

Query OK, 0 rows affected (0.01 sec)

--------------
create table t(`text` text)
--------------

Query OK, 0 rows affected (0.00 sec)

--------------
desc t
--------------

+-------+--------+----------------+
| Field | Type   | Properties     |
+-------+--------+----------------+
| id    | bigint |                |
| text  | text   | indexed stored |
+-------+--------+----------------+
2 rows in set (0.00 sec)

--------------
alter table t rt_mem_limit='512M'
--------------

ERROR 1064 (42000): sphinxql: syntax error, unexpected TEXT, expecting IDENT or TYPE near 'text text
)'

The workaround is to NOT use the reserved word text as a field name. I’ll speak to developers to see if there’s anything we can do, so it doesn’t break ALTER.