@@ -790,8 +790,8 @@ public function testCreateIndex()
790
790
{
791
791
$ result = $ this ->collectionHandler ->createIndex (
792
792
'ArangoDB_PHP_TestSuite_IndexTestCollection ' . '_ ' . static ::$ testsTimestamp , [
793
- 'type ' => 'hash ' ,
794
- 'name ' => 'mr-hash ' ,
793
+ 'type ' => 'persistent ' ,
794
+ 'name ' => 'mr-persistent ' ,
795
795
'fields ' => ['a ' , 'b ' ],
796
796
'unique ' => true ,
797
797
'sparse ' => true ,
@@ -807,11 +807,11 @@ public function testCreateIndex()
807
807
808
808
$ indexInfo = $ indicesByIdentifiers [$ result ['id ' ]];
809
809
810
- static ::assertEquals ('hash ' , $ indexInfo [CollectionHandler::OPTION_TYPE ]);
810
+ static ::assertEquals ('persistent ' , $ indexInfo [CollectionHandler::OPTION_TYPE ]);
811
811
static ::assertEquals (['a ' , 'b ' ], $ indexInfo ['fields ' ]);
812
812
static ::assertTrue ($ indexInfo ['unique ' ]);
813
813
static ::assertTrue ($ indexInfo ['sparse ' ]);
814
- static ::assertEquals ('mr-hash ' , $ indexInfo ['name ' ]);
814
+ static ::assertEquals ('mr-persistent ' , $ indexInfo ['name ' ]);
815
815
}
816
816
817
817
@@ -848,20 +848,18 @@ public function testGetIndexByName()
848
848
{
849
849
$ result = $ this ->collectionHandler ->createIndex (
850
850
'ArangoDB_PHP_TestSuite_IndexTestCollection ' . '_ ' . static ::$ testsTimestamp , [
851
- 'type ' => 'fulltext ' ,
851
+ 'type ' => 'persistent ' ,
852
852
'name ' => 'this-is-an-index ' ,
853
853
'fields ' => ['c ' ],
854
- 'minLength ' => 4 ,
855
854
]
856
855
);
857
856
858
857
$ indexInfo = $ this ->collectionHandler ->getIndex ('ArangoDB_PHP_TestSuite_IndexTestCollection ' . '_ ' . static ::$ testsTimestamp , $ result ['id ' ]);
859
858
860
- static ::assertEquals ('fulltext ' , $ indexInfo [CollectionHandler::OPTION_TYPE ]);
859
+ static ::assertEquals ('persistent ' , $ indexInfo [CollectionHandler::OPTION_TYPE ]);
861
860
static ::assertEquals (['c ' ], $ indexInfo ['fields ' ]);
862
861
static ::assertFalse ($ indexInfo ['unique ' ]);
863
- static ::assertTrue ($ indexInfo ['sparse ' ]);
864
- static ::assertEquals (4 , $ indexInfo ['minLength ' ]);
862
+ static ::assertFalse ($ indexInfo ['sparse ' ]);
865
863
static ::assertEquals ('this-is-an-index ' , $ indexInfo ['name ' ]);
866
864
}
867
865
@@ -872,10 +870,9 @@ public function testDropIndexById()
872
870
{
873
871
$ result = $ this ->collectionHandler ->createIndex (
874
872
'ArangoDB_PHP_TestSuite_IndexTestCollection ' . '_ ' . static ::$ testsTimestamp , [
875
- 'type ' => 'fulltext ' ,
873
+ 'type ' => 'persistent ' ,
876
874
'name ' => 'this-is-an-index ' ,
877
875
'fields ' => ['c ' ],
878
- 'minLength ' => 4 ,
879
876
]
880
877
);
881
878
@@ -891,10 +888,9 @@ public function testDropIndexByName()
891
888
{
892
889
$ result = $ this ->collectionHandler ->createIndex (
893
890
'ArangoDB_PHP_TestSuite_IndexTestCollection ' . '_ ' . static ::$ testsTimestamp , [
894
- 'type ' => 'fulltext ' ,
891
+ 'type ' => 'persistent ' ,
895
892
'name ' => 'this-is-an-index ' ,
896
893
'fields ' => ['c ' ],
897
- 'minLength ' => 4 ,
898
894
]
899
895
);
900
896
@@ -960,6 +956,7 @@ public function testCreateGeo2Index()
960
956
961
957
/**
962
958
* Create a hash index and verify it by getting information about the index from the server
959
+ * @deprecated the "hash" index type is deprecated on the server side
963
960
*/
964
961
public function testCreateHashIndex ()
965
962
{
@@ -994,6 +991,7 @@ public function testCreateHashIndex()
994
991
995
992
/**
996
993
* Create a sparse hash index and verify it by getting information about the index from the server
994
+ * @deprecated the "hash" index type is deprecated on the server side
997
995
*/
998
996
public function testCreateSparseHashIndex ()
999
997
{
@@ -1029,6 +1027,7 @@ public function testCreateSparseHashIndex()
1029
1027
1030
1028
/**
1031
1029
* Create a fulltext index and verify it by getting information about the index from the server
1030
+ * @deprecated the "fulltext" index type is deprecated from ArangoDB 3.10 onwards
1032
1031
*/
1033
1032
public function testCreateFulltextIndex ()
1034
1033
{
@@ -1059,6 +1058,7 @@ public function testCreateFulltextIndex()
1059
1058
1060
1059
/**
1061
1060
* Create a skiplist index and verify it by getting information about the index from the server
1061
+ * @deprecated the "skiplist" index type is deprecated on the server side
1062
1062
*/
1063
1063
public function testCreateSkipListIndex ()
1064
1064
{
@@ -1091,6 +1091,7 @@ public function testCreateSkipListIndex()
1091
1091
1092
1092
/**
1093
1093
* Create a sparse skiplist index and verify it by getting information about the index from the server
1094
+ * @deprecated the "skiplist" index type is deprecated on the server side
1094
1095
*/
1095
1096
public function testCreateSparseSkipListIndex ()
1096
1097
{
@@ -1221,6 +1222,7 @@ public function testCreateTtlIndex()
1221
1222
1222
1223
/**
1223
1224
* Test creating an index and getting it to verify.
1225
+ * @deprecated the "fulltext" index type is deprecated from ArangoDB 3.10 onwards
1224
1226
*/
1225
1227
public function testGetIndex ()
1226
1228
{
@@ -1251,12 +1253,14 @@ public function testGetIndex()
1251
1253
*/
1252
1254
public function testCreateIndexInBackground ()
1253
1255
{
1254
- $ result = $ this ->collectionHandler ->createHashIndex (
1255
- 'ArangoDB_PHP_TestSuite_IndexTestCollection ' . '_ ' . static ::$ testsTimestamp ,
1256
- ['test ' ],
1257
- false ,
1258
- false ,
1259
- true
1256
+ $ result = $ this ->collectionHandler ->createIndex (
1257
+ 'ArangoDB_PHP_TestSuite_IndexTestCollection ' . '_ ' . static ::$ testsTimestamp , [
1258
+ 'type ' => 'persistent ' ,
1259
+ 'fields ' => ['test ' ],
1260
+ 'unique ' => false ,
1261
+ 'sparse ' => false ,
1262
+ 'inBackground ' => true
1263
+ ]
1260
1264
);
1261
1265
1262
1266
$ indices = $ this ->collectionHandler ->getIndexes ('ArangoDB_PHP_TestSuite_IndexTestCollection ' . '_ ' . static ::$ testsTimestamp );
@@ -1268,7 +1272,7 @@ public function testCreateIndexInBackground()
1268
1272
$ indexInfo = $ indicesByIdentifiers [$ result ['id ' ]];
1269
1273
1270
1274
static ::assertEquals (
1271
- CollectionHandler::OPTION_HASH_INDEX ,
1275
+ CollectionHandler::OPTION_PERSISTENT_INDEX ,
1272
1276
$ indexInfo [CollectionHandler::OPTION_TYPE ]
1273
1277
);
1274
1278
static ::assertEquals (['test ' ], $ indexInfo ['fields ' ]);
0 commit comments