Geen omschrijving

EsModel.php 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. namespace App;
  3. use App\Components\EsNative;
  4. /**
  5. * Class EsModel
  6. * @package App\Models\Es
  7. */
  8. class EsModel {
  9. public static function createIdx($params) {
  10. /** @var EsNative $es */
  11. $es = app('es');
  12. return $es->createIdx($params);
  13. }
  14. public static function deleteIdx($params) {
  15. /** @var EsNative $es */
  16. $es = app('es');
  17. return $es->deleteIdx($params);
  18. }
  19. public static function addDoc($params) {
  20. /** @var EsNative $es */
  21. $es = app('es');
  22. return $es->addDoc($params);
  23. }
  24. public static function deleteDoc($params) {
  25. /** @var EsNative $es */
  26. $es = app('es');
  27. return $es->deleteDoc($params);
  28. }
  29. public static function updateDoc($params) {
  30. /** @var EsNative $es */
  31. $es = app('es');
  32. return $es->updateDoc($params);
  33. }
  34. public static function searchDoc($params) {
  35. /** @var EsNative $es */
  36. $es = app('es');
  37. return $es->searchDoc($params);
  38. }
  39. public static function bulkDoc($data) {
  40. /** @var EsNative $es */
  41. $es = app('es');
  42. return $es->bulkDoc($data);
  43. }
  44. public static function countDoc($data) {
  45. /** @var EsNative $es */
  46. $es = app('es');
  47. return $es->countDoc($data);
  48. }
  49. public static function addAlias($params) {
  50. /** @var EsNative $es */
  51. $es = app('es');
  52. return $es->addAlias($params);
  53. }
  54. public static function updateByQuery($params) {
  55. /** @var EsNative $es */
  56. $es = app('es');
  57. return $es->updateByQuery($params);
  58. }
  59. }