Skip to content

Commit e4c5311

Browse files
author
Simonas Šerlinskas
committed
Merge branch 'client-func-aliases-patch' into 5.0
2 parents 996daae + 60f7237 commit e4c5311

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

Service/Manager.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,27 @@ public function clearScroll($scrollId)
640640
$this->getClient()->clearScroll(['scroll_id' => $scrollId]);
641641
}
642642

643+
/**
644+
* Calls "Get Settings API" in Elasticsearch and will return you the currently configured settings.
645+
*
646+
* return array
647+
*/
648+
public function getSettings()
649+
{
650+
return $this->getClient()->indices()->getSettings(['index' => $this->getIndexName()]);
651+
}
652+
653+
/**
654+
* Gets Elasticsearch aliases information.
655+
* @param $params
656+
*
657+
* @return array
658+
*/
659+
public function getAliases($params = [])
660+
{
661+
return $this->getClient()->indices()->getAliases(array_merge(['index' => $this->getIndexName()], $params));
662+
}
663+
643664
/**
644665
* Resolves type name by class name.
645666
*

Service/Repository.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ public function createSearch()
191191
return new Search();
192192
}
193193

194-
195194
/**
196195
* Parses scroll configuration from raw response.
197196
*

0 commit comments

Comments
 (0)