File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -125,7 +125,9 @@ public function searchAfter(array $searchAfter): self
125125 }
126126
127127 /**
128- * Set the point in time definition.
128+ * Set the point in time definition for this search request.
129+ *
130+ * The keep alive value is optional when searching with an existing PIT.
129131 *
130132 * @see https://docs.opensearch.org/latest/api-reference/search-apis/point-in-time-api/
131133 *
Original file line number Diff line number Diff line change 9898 ], $ request ->toArray ());
9999});
100100
101+ test ('array casting with point in time without keep alive ' , function () {
102+ $ request = new SearchRequest ([
103+ 'match_all ' => new stdClass ,
104+ ]);
105+
106+ $ request ->pit ('pit-id ' );
107+
108+ expect ($ request ->toArray ())->toEqual ([
109+ 'body ' => [
110+ 'query ' => [
111+ 'match_all ' => new stdClass ,
112+ ],
113+ 'pit ' => [
114+ 'id ' => 'pit-id ' ,
115+ ],
116+ ],
117+ ]);
118+ });
119+
101120test ('array casting with query and rescore ' , function () {
102121 $ request = new SearchRequest ([
103122 'match_all ' => new stdClass ,
You can’t perform that action at this time.
0 commit comments