manticoresearch
manticoresearch copied to clipboard
Allow spaces after comma in fieldlist
This:
@(title, body)
gives a fatal error, because only this is allowed
@(title,body)
This is very unintuitive and it is also not consistent with SQL, where adding spaces after field names does work (eg in insert queries).
Request to allow spaces after field names.
Some notes:
W/o a document in the table there's no error:
mysql> drop table if exists t; create table t(f text, f2 text); select * from t where match('@(f, f2) abc');
--------------
drop table if exists t
--------------
Query OK, 0 rows affected (0.00 sec)
--------------
create table t(f text, f2 text)
--------------
Query OK, 0 rows affected (0.00 sec)
--------------
select * from t where match('@(f, f2) abc')
--------------
Empty set (0.00 sec)
--- 0 out of 0 results in 1ms ---
MRE:
mysql> drop table if exists t; create table t(f text, f2 text); insert into t values(1, 'abc', 'def'); select * from t where match('@(f, f2) abc'); select * from t where match('@(f,f2) abc');
--------------
drop table if exists t
--------------
Query OK, 0 rows affected (0.00 sec)
--------------
create table t(f text, f2 text)
--------------
Query OK, 0 rows affected (0.00 sec)
--------------
insert into t values(1, 'abc', 'def')
--------------
Query OK, 1 row affected (0.00 sec)
--------------
select * from t where match('@(f, f2) abc')
--------------
ERROR 1064 (42000): table t: query error: error parsing field list: invalid field block operator syntax near ' f2) abc'
--------------
select * from t where match('@(f,f2) abc')
--------------
+------+------+------+
| id | f | f2 |
+------+------+------+
| 1 | abc | def |
+------+------+------+
1 row in set (0.01 sec)
--- 1 out of 1 results in 3ms ---