We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 012a42b + f294370 commit 650ca11Copy full SHA for 650ca11
Model/Item.php
@@ -671,6 +671,10 @@ public static function createFromArray(array $array): self
671
*/
672
public static function getPathByField(string $field)
673
{
674
+ if (0 === strpos($field, 'indexed_metadata.')) {
675
+ return $field;
676
+ }
677
+
678
if ('_id' === $field) {
679
return $field;
680
}
Tests/Model/ItemTest.php
@@ -543,5 +543,6 @@ public function testPathByField()
543
$this->assertEquals('uuid.type', Item::getPathByField('type'));
544
$this->assertEquals('indexed_metadata.another_id', Item::getPathByField('another_id'));
545
$this->assertEquals('indexed_metadata._field', Item::getPathByField('_field'));
546
+ $this->assertEquals('indexed_metadata._field', Item::getPathByField('indexed_metadata._field'));
547
548
0 commit comments