@@ -1969,7 +1969,7 @@ public function consistentWith($state) {}
1969
1969
* - UPSERT
1970
1970
* - DELETE
1971
1971
*
1972
- * @param boolean $readonly true if readonly should be forced, false is the default and will use the server side default.
1972
+ * @param bool $readonly true if readonly should be forced, false is the default and will use the server side default.
1973
1973
* @return N1qlQuery
1974
1974
*/
1975
1975
public function readonly ($ readonly ) {}
@@ -3395,6 +3395,169 @@ public function jsonSerialize() {}
3395
3395
public function addRange ($ name , $ min , $ max ) {}
3396
3396
}
3397
3397
3398
+ /**
3399
+ * Base class for all FTS sort options in querying.
3400
+ */
3401
+ class SearchSort {
3402
+ /** @ignore */
3403
+ private function __construct () {}
3404
+
3405
+ /**
3406
+ * Sort by the document identifier.
3407
+ *
3408
+ * @return SearchSortId
3409
+ */
3410
+ public static function id () {}
3411
+
3412
+ /**
3413
+ * Sort by the hit score.
3414
+ *
3415
+ * @return SearchSortScore
3416
+ */
3417
+ public static function score () {}
3418
+
3419
+ /**
3420
+ * Sort by a field in the hits.
3421
+ *
3422
+ * @param string $field the field name
3423
+ *
3424
+ * @return SearchSortField
3425
+ */
3426
+ public static function field ($ field ) {}
3427
+
3428
+ /**
3429
+ * Sort by geo location.
3430
+ *
3431
+ * @param string $field the field name
3432
+ * @param float $longitude the longitude of the location
3433
+ * @param float $latitude the latitude of the location
3434
+ *
3435
+ * @return SearchSortGeoDistance
3436
+ */
3437
+ public static function geoDistance ($ field , $ longitude , $ latitude ) {}
3438
+ }
3439
+
3440
+ /**
3441
+ * Sort by the document identifier.
3442
+ */
3443
+ class SearchSortId extends SearchSort implements \JsonSerializable {
3444
+ /** @ignore */
3445
+ private function __construct () {}
3446
+
3447
+ /**
3448
+ * Direction of the sort
3449
+ *
3450
+ * @param bool $descending
3451
+ *
3452
+ * @return SearchSortId
3453
+ */
3454
+ public function descending ($ descending ) {}
3455
+ }
3456
+
3457
+ /**
3458
+ * Sort by the hit score.
3459
+ */
3460
+ class SearchSortScore extends SearchSort implements \JsonSerializable {
3461
+ /** @ignore */
3462
+ private function __construct () {}
3463
+
3464
+ /**
3465
+ * Direction of the sort
3466
+ *
3467
+ * @param bool $descending
3468
+ *
3469
+ * @return SearchSortScore
3470
+ */
3471
+ public function descending ($ descending ) {}
3472
+ }
3473
+
3474
+ /**
3475
+ * Sort by a field in the hits.
3476
+ */
3477
+ class SearchSortField extends SearchSort implements \JsonSerializable {
3478
+ const TYPE_AUTO = "auto " ;
3479
+ const TYPE_STRING = "string " ;
3480
+ const TYPE_NUMBER = "number " ;
3481
+ const TYPE_DATE = "date " ;
3482
+
3483
+ const MODE_DEFAULT = "default " ;
3484
+ const MODE_MIN = "min " ;
3485
+ const MODE_MAX = "max " ;
3486
+
3487
+ const MISSING_FIRST = "first " ;
3488
+ const MISSING_LAST = "last " ;
3489
+
3490
+ /** @ignore */
3491
+ private function __construct () {}
3492
+
3493
+ /**
3494
+ * Direction of the sort
3495
+ *
3496
+ * @param bool $descending
3497
+ *
3498
+ * @return SearchSortField
3499
+ */
3500
+ public function descending ($ descending ) {}
3501
+
3502
+ /**
3503
+ * Set type of the field
3504
+ *
3505
+ * @param string type the type
3506
+ *
3507
+ * @see SearchSortField::TYPE_AUTO
3508
+ * @see SearchSortField::TYPE_STRING
3509
+ * @see SearchSortField::TYPE_NUMBER
3510
+ * @see SearchSortField::TYPE_DATE
3511
+ */
3512
+ public function type ($ type ) {}
3513
+
3514
+ /**
3515
+ * Set mode of the sort
3516
+ *
3517
+ * @param string mode the mode
3518
+ *
3519
+ * @see SearchSortField::MODE_MIN
3520
+ * @see SearchSortField::MODE_MAX
3521
+ */
3522
+ public function mode ($ mode ) {}
3523
+
3524
+ /**
3525
+ * Set where the hits with missing field will be inserted
3526
+ *
3527
+ * @param string missing strategy for hits with missing fields
3528
+ *
3529
+ * @see SearchSortField::MISSING_FIRST
3530
+ * @see SearchSortField::MISSING_LAST
3531
+ */
3532
+ public function missing ($ missing ) {}
3533
+ }
3534
+
3535
+ /**
3536
+ * Sort by a location and unit in the hits.
3537
+ */
3538
+ class SearchSortGeoDistance extends SearchSort implements \JsonSerializable {
3539
+ /** @ignore */
3540
+ private function __construct () {}
3541
+
3542
+ /**
3543
+ * Direction of the sort
3544
+ *
3545
+ * @param bool $descending
3546
+ *
3547
+ * @return SearchSortGeoDistance
3548
+ */
3549
+ public function descending ($ descending ) {}
3550
+
3551
+ /**
3552
+ * Name of the units
3553
+ *
3554
+ * @param string $unit
3555
+ *
3556
+ * @return SearchSortGeoDistance
3557
+ */
3558
+ public function unit ($ unit ) {}
3559
+ }
3560
+
3398
3561
/**
3399
3562
* Represents a Analytics query (currently experimental support).
3400
3563
*
0 commit comments