-
-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Labels
type:bugBugBug
Description
What steps will reproduce the problem?
$query = new \yii\sphinx\Query();
$query->select('id, name, entity_id, entity_type')->
from('all');
//...
$query->match(new Expression(':match', ['match' => $str]));
What's expected?
SQL like:
SELECT `id` , `name` , `entity_id` , `entity_type` FROM `all` WHERE MATCH('dddddddd* ')
What do you get instead?
SELECT `id` AS `id`, `name` AS `name`, `entity_id` AS `entity_id`, `entity_type` AS `entity_type` FROM `all` WHERE MATCH('dddddddd* ')
And such sql - with aliases which are the same with fields they are for - does not work for sphinx 2.3.2 and two other earlier versions.
One can try such sphinx sql in console, the one with such aliases does not work.
The error is this one:
ERROR 1064 (42000): sphinxql: syntax error, unexpected ID near '`id`, `name` AS `name`, `entity_id` AS `entity_id`, `entity_type` AS `entity_type` FROM `all` WHERE MATCH('sss')'
Additional info
Q | A |
---|---|
Yii version | 2.0.32 |
Yii Sphinx version | 2.0.11 |
Sphinx server version | 2.3.2 |
PHP version | 7.3. |
Operating system | Ubuntu 16 |
Metadata
Metadata
Assignees
Labels
type:bugBugBug