$key, 'type' => $attribute['type'], 'array' => $attribute['array'], ]); } $indexes = []; foreach ($allowedAttributes as $attribute) { $indexes[] = new Document([ 'status' => 'available', 'type' => Database::INDEX_KEY, 'attributes' => [$attribute] ]); } $indexes[] = new Document([ 'status' => 'available', 'type' => Database::INDEX_FULLTEXT, 'attributes' => ['search'] ]); parent::__construct(new QueryValidator($attributes), $attributes, $indexes, true); } }