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
if (!\in_array($attributeType, Database::SPATIAL_TYPES, true)) {
360
351
continue;
361
352
}
362
353
354
+
if (!$this->spatialIndexSupport) {
355
+
$this->message = 'Spatial indexes are not supported';
356
+
returnfalse;
357
+
}
358
+
359
+
if (count($attributes) !== 1) {
360
+
$this->message = 'Spatial index can be created on a single spatial attribute';
361
+
returnfalse;
362
+
}
363
+
363
364
if ($type !== Database::INDEX_SPATIAL) {
364
365
$this->message = 'Spatial index can only be created on spatial attributes (point, linestring, polygon). Attribute "' . $attributeName . '" is of type "' . $attributeType . '"';
365
366
returnfalse;
@@ -369,13 +370,14 @@ public function checkSpatialIndex(Document $index): bool
369
370
$this->message = 'Spatial indexes do not allow null values. Mark the attribute "' . $attributeName . '" as required or create the index on a column with no null values.';
370
371
returnfalse;
371
372
}
372
-
}
373
373
374
-
if (!empty($orders) && !$this->spatialIndexOrderSupport) {
375
-
$this->message = 'Spatial indexes with explicit orders are not supported. Remove the orders to create this index.';
376
-
returnfalse;
374
+
if (!empty($orders) && !$this->spatialIndexOrderSupport) {
375
+
$this->message = 'Spatial indexes with explicit orders are not supported. Remove the orders to create this index.';
0 commit comments