Skip to content

Commit b5a3c95

Browse files
committed
Simplify check
1 parent 363cc8d commit b5a3c95

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Database/Validator/Index.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class Index extends Validator
2323
* @param bool $supportForArrayIndexes
2424
* @param bool $supportForSpatialIndexNull
2525
* @param bool $supportForSpatialIndexOrder
26+
* @param bool $supportForVectorIndexes
2627
* @throws DatabaseException
2728
*/
2829
public function __construct(

src/Database/Validator/Query/Filter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ protected function isValidAttributeAndValues(string $attribute, array $values, s
236236
}
237237

238238
// Vector queries can only be used on vector attributes (not arrays)
239-
if (in_array($method, [Query::TYPE_VECTOR_DOT, Query::TYPE_VECTOR_COSINE, Query::TYPE_VECTOR_EUCLIDEAN])) {
239+
if (\in_array($method, Query::VECTOR_TYPES)) {
240240
if ($attributeSchema['type'] !== Database::VAR_VECTOR) {
241241
$this->message = 'Vector queries can only be used on vector attributes';
242242
return false;

0 commit comments

Comments
 (0)