@@ -31,14 +31,18 @@ class FilterBuilder extends Builder
3131 public $ collapse ;
3232
3333 /**
34+ * The select array.
3435 * @var array
3536 */
3637 public $ select = [];
3738
3839 /**
39- * @param Model $model
40+ * FilterBuilder constructor.
41+ *
42+ * @param \Illuminate\Database\Eloquent\Model $model
4043 * @param callable|null $callback
4144 * @param bool $softDelete
45+ * @return void
4246 */
4347 public function __construct (Model $ model , $ callback = null , $ softDelete = false )
4448 {
@@ -55,6 +59,8 @@ public function __construct(Model $model, $callback = null, $softDelete = false)
5559 }
5660
5761 /**
62+ * Add a where condition.
63+ *
5864 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-term-query.html Term query
5965 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-range-query.html Range query
6066 *
@@ -136,6 +142,8 @@ public function where($field, $value)
136142 }
137143
138144 /**
145+ * Add a whereIn condition.
146+ *
139147 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-terms-query.html Terms query
140148 *
141149 * @param string $field
@@ -154,6 +162,8 @@ public function whereIn($field, array $value)
154162 }
155163
156164 /**
165+ * Add a whereNotIn condition.
166+ *
157167 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-terms-query.html Terms query
158168 *
159169 * @param string $field
@@ -172,6 +182,8 @@ public function whereNotIn($field, array $value)
172182 }
173183
174184 /**
185+ * Add a whereBetween condition.
186+ *
175187 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-range-query.html Range query
176188 *
177189 * @param string $field
@@ -193,6 +205,8 @@ public function whereBetween($field, array $value)
193205 }
194206
195207 /**
208+ * Add a whereNotBetween condition.
209+ *
196210 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-range-query.html Range query
197211 *
198212 * @param string $field
@@ -214,6 +228,8 @@ public function whereNotBetween($field, array $value)
214228 }
215229
216230 /**
231+ * Add a whereExists condition.
232+ *
217233 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-query.html Exists query
218234 *
219235 * @param string $field
@@ -231,6 +247,8 @@ public function whereExists($field)
231247 }
232248
233249 /**
250+ * Add a whereNotExists condition
251+ *
234252 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-query.html Exists query
235253 *
236254 * @param string $field
@@ -248,6 +266,8 @@ public function whereNotExists($field)
248266 }
249267
250268 /**
269+ * Add a whereRegexp condition.
270+ *
251271 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-regexp-query.html Regexp query
252272 *
253273 * @param string $field
@@ -270,6 +290,8 @@ public function whereRegexp($field, $value, $flags = 'ALL')
270290 }
271291
272292 /**
293+ * Add a whereGeoDistance condition.
294+ *
273295 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-distance-query.html Geo distance query
274296 *
275297 * @param string $field
@@ -290,6 +312,8 @@ public function whereGeoDistance($field, $value, $distance)
290312 }
291313
292314 /**
315+ * Add a whereGeoBoundingBox condition.
316+ *
293317 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-bounding-box-query.html Geo bounding box query
294318 *
295319 * @param string $field
@@ -308,6 +332,8 @@ public function whereGeoBoundingBox($field, array $value)
308332 }
309333
310334 /**
335+ * Add a whereGeoPolygon condition.
336+ *
311337 * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-polygon-query.html Geo polygon query
312338 *
313339 * @param string $field
@@ -326,8 +352,10 @@ public function whereGeoPolygon($field, array $points)
326352
327353 return $ this ;
328354 }
329-
355+
330356 /**
357+ * Add a whereGeoShape condition.
358+ *
331359 * @see https://www.elastic.co/guide/en/elasticsearch/guide/current/querying-geo-shapes.html Querying Geo Shapes
332360 *
333361 * @param string $field
@@ -346,8 +374,10 @@ public function whereGeoShape($field, array $shape)
346374
347375 return $ this ;
348376 }
349-
377+
350378 /**
379+ * Add a orderBy clause.
380+ *
351381 * @param string $field
352382 * @param string $direction
353383 * @return $this
@@ -362,6 +392,8 @@ public function orderBy($field, $direction = 'asc')
362392 }
363393
364394 /**
395+ * Explain the request.
396+ *
365397 * @return array
366398 */
367399 public function explain ()
@@ -372,6 +404,8 @@ public function explain()
372404 }
373405
374406 /**
407+ * Profile the request.
408+ *
375409 * @return array
376410 */
377411 public function profile ()
@@ -382,6 +416,7 @@ public function profile()
382416 }
383417
384418 /**
419+ * Build the payload.
385420 * @return array
386421 */
387422 public function buildPayload ()
@@ -392,6 +427,8 @@ public function buildPayload()
392427 }
393428
394429 /**
430+ * Eager load some some relations.
431+ *
395432 * @param array|string $relations
396433 * @return $this
397434 */
@@ -403,6 +440,7 @@ public function with($relations)
403440 }
404441
405442 /**
443+ * Set the query offset.
406444 * @param int $offset
407445 * @return $this
408446 */
@@ -444,6 +482,8 @@ public function paginate($perPage = null, $pageName = 'page', $page = null)
444482 }
445483
446484 /**
485+ * Collapse by a field.
486+ *
447487 * @param string $field
448488 * @return $this
449489 */
@@ -455,6 +495,8 @@ public function collapse(string $field)
455495 }
456496
457497 /**
498+ * Select one or many fields.
499+ *
458500 * @param mixed $fields
459501 * @return $this
460502 */
@@ -469,6 +511,8 @@ public function select($fields)
469511 }
470512
471513 /**
514+ * Get the count.
515+ *
472516 * @return int
473517 */
474518 public function count ()
0 commit comments