Skip to content

Commit b071ae2

Browse files
committed
ECS-827
1 parent c2b10be commit b071ae2

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/ElasticClient.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ public function __construct(private Client $client)
1717
{
1818
}
1919

20+
public function getClient(): Client
21+
{
22+
return $this->client;
23+
}
24+
2025
public function search(string $indexName, array $dsl): array
2126
{
2227
$this->queryLog?->log($indexName, $dsl);

src/ElasticQuery.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,25 @@
22

33
namespace Ensi\LaravelElasticQuery;
44

5+
use Elasticsearch\Client;
56
use Ensi\LaravelElasticQuery\Debug\QueryLogRecord;
67
use Illuminate\Support\Collection;
78
use Illuminate\Support\Facades\Facade;
89

910
/**
11+
* @method static Client getClient()
1012
* @method static array search(string $indexName, array $dsl)
13+
* @method static array searchAsync(string $indexName, array $dsl)
14+
* @method static array deleteByQuery(string $indexName, array $dsl)
15+
* @method static array get(string $indexName, int|string $id)
16+
* @method static array indicesExists(string $index)
17+
* @method static void indicesCreate(string $index, array $settings)
18+
* @method static array bulk(string $index, array $body)
19+
* @method static array documentDelete(string $index, int|string $id)
20+
* @method static array catIndices(string $indexName, array|null $getFields)
21+
* @method static array indicesDelete(string $indexName)
22+
* @method static array indicesRefresh(string $indexName)
23+
* @method static array indicesReloadSearchAnalyzers(string $indexName)
1124
* @method static void enableQueryLog()
1225
* @method static void disableQueryLog()
1326
* @method static Collection|QueryLogRecord[] getQueryLog()

0 commit comments

Comments
 (0)