diff --git a/Model/Item.php b/Model/Item.php index 2fb72f8..313cde1 100644 --- a/Model/Item.php +++ b/Model/Item.php @@ -675,6 +675,10 @@ public static function getPathByField(string $field) return $field; } + if ('uuid' === $field) { + return '_id'; + } + if ('_id' === $field) { return $field; } diff --git a/Tests/Model/ItemTest.php b/Tests/Model/ItemTest.php index ad7870a..9d1d111 100644 --- a/Tests/Model/ItemTest.php +++ b/Tests/Model/ItemTest.php @@ -539,6 +539,7 @@ public function testMap() public function testPathByField() { $this->assertEquals('_id', Item::getPathByField('_id')); + $this->assertEquals('_id', Item::getPathByField('uuid')); $this->assertEquals('uuid.id', Item::getPathByField('id')); $this->assertEquals('uuid.type', Item::getPathByField('type')); $this->assertEquals('indexed_metadata.another_id', Item::getPathByField('another_id'));