1
|
|
|
<?php |
2
|
|
|
namespace Triadev\Leopard\Facade; |
3
|
|
|
|
4
|
|
|
use Elasticsearch\Client; |
5
|
|
|
use Illuminate\Database\Eloquent\Model; |
6
|
|
|
use Illuminate\Support\Facades\Facade; |
7
|
|
|
use Triadev\Leopard\Business\Dsl\SearchDsl; |
8
|
|
|
use Triadev\Leopard\Business\Repository\ElasticsearchRepository; |
9
|
|
|
use Triadev\Leopard\Contract\ElasticsearchManagerContract; |
10
|
|
|
use Triadev\Es\Dsl\Dsl\Search; |
11
|
|
|
use Triadev\Es\Dsl\Dsl\Suggestion; |
12
|
|
|
|
13
|
|
|
/** |
14
|
|
|
* Class Leopard |
15
|
|
|
* @package Triadev\Leopard\Facade |
16
|
|
|
* |
17
|
|
|
* @method static Client getEsClient() |
18
|
|
|
* @method static string getEsDefaultIndex() |
19
|
|
|
* @method static SearchDsl|Search search(?\ONGR\ElasticsearchDSL\Search $search = null, ?Model $model = null) |
20
|
|
|
* @method static Suggestion suggest() |
21
|
|
|
* @method static ElasticsearchRepository repository() |
22
|
|
|
* @method static array searchStatement(array $params) |
23
|
|
|
* @method static array putMappingStatement(array $params) |
24
|
|
|
* @method static array indexStatement(array $params) |
25
|
|
|
* @method static array updateStatement(array $params) |
26
|
|
|
* @method static bool existStatement(array $params) |
27
|
|
|
* @method static bool existIndexStatement(array $params) |
28
|
|
|
* @method static array deleteStatement(array $params) |
29
|
|
|
* @method static array getStatement(array $params) |
30
|
|
|
* @method static array suggestStatement(array $params) |
31
|
|
|
* @method static array bulkStatement(array $params) |
32
|
|
|
*/ |
33
|
|
|
class Leopard extends Facade |
34
|
|
|
{ |
35
|
|
|
/** |
36
|
|
|
* @return ElasticsearchManagerContract |
37
|
|
|
*/ |
38
|
19 |
|
protected static function getFacadeAccessor() |
39
|
|
|
{ |
40
|
19 |
|
return app(ElasticsearchManagerContract::class); |
41
|
|
|
} |
42
|
|
|
} |
43
|
|
|
|