You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The MATCH() followed by an OR is causing error: ERROR 1064 (42000): P01: syntax error, unexpected OR, expecting $end near ...
To Reproduce
create table t (m text);
insert into t values (1, 'apple');
insert into t values (2, 'pear');
insert into t values (3, 'pear with apple');
insert into t values (4, 'plum');
select * from t where MATCH('@m apple') OR id > 3;
Expected behavior
The select should return documents with id 1,3 and 4
Describe the environment:
Manticore Search version: 6.2.12 dc5144d35@230822 and 5.0.2 348514c@220530 also
OS version (uname -a if on a Unix-like system): Amazon Linux 5.10.118-111.515.amzn2.x86_64 1 SMP
Additional context
If I put an AND after the MATCH(), the error won't appear, but result will be wrong, missing documents matching the conditions after OR, e.g.: select * from t where MATCH('@m apple') AND id > 0 OR id > 3;
The result should contain document with id 4, but missing: mysql> select * from t where MATCH('@m apple') AND id > 0 OR id > 3; +------+-----------------+ | id | m | +------+-----------------+ | 3 | pear with apple | | 1 | apple | +------+-----------------+ mysql>
The text was updated successfully, but these errors were encountered:
Describe the bug
The MATCH() followed by an OR is causing error:
ERROR 1064 (42000): P01: syntax error, unexpected OR, expecting $end near ...
To Reproduce
create table t (m text);
insert into t values (1, 'apple');
insert into t values (2, 'pear');
insert into t values (3, 'pear with apple');
insert into t values (4, 'plum');
select * from t where MATCH('@m apple') OR id > 3;
Expected behavior
The select should return documents with id 1,3 and 4
Describe the environment:
6.2.12 dc5144d35@230822
and5.0.2 348514c@220530
alsouname -a
if on a Unix-like system): Amazon Linux 5.10.118-111.515.amzn2.x86_64 1 SMPAdditional context
If I put an AND after the MATCH(), the error won't appear, but result will be wrong, missing documents matching the conditions after OR, e.g.:
select * from t where MATCH('@m apple')
AND id > 0
OR id > 3;
The result should contain document with id 4, but missing:
mysql> select * from t where MATCH('@m apple') AND id > 0 OR id > 3;
+------+-----------------+
| id | m |
+------+-----------------+
| 3 | pear with apple |
| 1 | apple |
+------+-----------------+
mysql>
The text was updated successfully, but these errors were encountered: