7
7
use Meilisearch \Endpoints \Indexes ;
8
8
use Tests \TestCase ;
9
9
10
- final class SearchTestNestedFields extends TestCase
10
+ final class SearchNestedFieldsTest extends TestCase
11
11
{
12
12
private Indexes $ index ;
13
13
@@ -16,7 +16,7 @@ protected function setUp(): void
16
16
parent ::setUp ();
17
17
$ this ->index = $ this ->createEmptyIndex ($ this ->safeIndexName ('nestedIndex ' ));
18
18
$ promise = $ this ->index ->updateDocuments (self ::NESTED_DOCUMENTS );
19
- $ this ->index ->waitForTask ($ promise ['uid ' ]);
19
+ $ this ->index ->waitForTask ($ promise ['taskUid ' ]);
20
20
}
21
21
22
22
public function testBasicSearchOnNestedFields (): void
@@ -48,7 +48,7 @@ public function testSearchOnNestedFieldWithMultiplesResultsOnNestedFields(): voi
48
48
49
49
self ::assertArrayHasKey ('hits ' , $ response );
50
50
self ::assertSame (6 , $ response ['estimatedTotalHits ' ]);
51
- self ::assertSame (4 , $ response ['hits ' ][0 ]['id ' ]);
51
+ self ::assertSame (1 , $ response ['hits ' ][0 ]['id ' ]);
52
52
}
53
53
54
54
public function testSearchOnNestedFieldWithOptions (): void
@@ -62,13 +62,13 @@ public function testSearchOnNestedFieldWithOptions(): void
62
62
]);
63
63
64
64
self ::assertCount (1 , $ response ['hits ' ]);
65
- self ::assertSame (4 , $ response ['hits ' ][0 ]['id ' ]);
65
+ self ::assertSame (1 , $ response ['hits ' ][0 ]['id ' ]);
66
66
}
67
67
68
68
public function testSearchOnNestedFieldWithSearchableAtributes (): void
69
69
{
70
70
$ response = $ this ->index ->updateSearchableAttributes (['title ' , 'info.comment ' ]);
71
- $ this ->index ->waitForTask ($ response ['uid ' ]);
71
+ $ this ->index ->waitForTask ($ response ['taskUid ' ]);
72
72
73
73
$ response = $ this ->index ->search ('An awesome ' );
74
74
@@ -87,7 +87,7 @@ public function testSearchOnNestedFieldWithSearchableAtributes(): void
87
87
public function testSearchOnNestedFieldWithSortableAtributes (): void
88
88
{
89
89
$ response = $ this ->index ->updateSortableAttributes (['info.reviewNb ' ]);
90
- $ this ->index ->waitForTask ($ response ['uid ' ]);
90
+ $ this ->index ->waitForTask ($ response ['taskUid ' ]);
91
91
92
92
$ response = $ this ->index ->search ('An awesome ' );
93
93
@@ -111,7 +111,7 @@ public function testSearchOnNestedFieldWithSortableAtributesAndSearchableAttribu
111
111
'searchableAttributes ' => ['title ' , 'info.comment ' ],
112
112
'sortableAttributes ' => ['info.reviewNb ' ],
113
113
]);
114
- $ this ->index ->waitForTask ($ response ['uid ' ]);
114
+ $ this ->index ->waitForTask ($ response ['taskUid ' ]);
115
115
116
116
$ response = $ this ->index ->search ('An awesome ' );
117
117
0 commit comments