mirror of
https://github.com/predis/predis.git
synced 2026-09-15 12:57:10 +00:00
Changed idx name for different index types
This commit is contained in:
@@ -76,13 +76,13 @@ class FTSEARCH_Test extends PredisCommandTestCase
|
||||
|
||||
$schema = [new NumericField('$..arr', 'arr'), new TextField('$..val', 'val')];
|
||||
|
||||
$ftCreateResponse = $redis->ftcreate('idx', $schema, $createArguments);
|
||||
$ftCreateResponse = $redis->ftcreate('idx_json', $schema, $createArguments);
|
||||
$this->assertEquals('OK', $ftCreateResponse);
|
||||
|
||||
$ftSearchArguments = new SearchArguments();
|
||||
$ftSearchArguments->addReturn(2, 'arr', 'val');
|
||||
|
||||
$actualResponse = $redis->ftsearch('idx', '*', $ftSearchArguments);
|
||||
$actualResponse = $redis->ftsearch('idx_json', '*', $ftSearchArguments);
|
||||
$this->assertSame($expectedResponse, $actualResponse);
|
||||
}
|
||||
|
||||
@@ -107,13 +107,13 @@ class FTSEARCH_Test extends PredisCommandTestCase
|
||||
new TextField('field2', 'should_not_return'),
|
||||
];
|
||||
|
||||
$ftCreateResponse = $redis->ftcreate('idx', $schema, $ftCreateArguments);
|
||||
$ftCreateResponse = $redis->ftcreate('idx_hash', $schema, $ftCreateArguments);
|
||||
$this->assertEquals('OK', $ftCreateResponse);
|
||||
|
||||
$ftSearchArguments = new SearchArguments();
|
||||
$ftSearchArguments->addReturn(1, 'should_return');
|
||||
|
||||
$actualResponse = $redis->ftsearch('idx', '*', $ftSearchArguments);
|
||||
$actualResponse = $redis->ftsearch('idx_hash', '*', $ftSearchArguments);
|
||||
$this->assertSame($expectedResponse, $actualResponse);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user