Fix empty mappings for old ES versions
This commit is contained in:
parent
84cf6c79c2
commit
20033709cf
6 changed files with 62 additions and 13 deletions
|
|
@ -35,6 +35,14 @@ class TypeConfig
|
|||
$this->name = $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string|null
|
||||
*/
|
||||
public function getIndexAnalyzer()
|
||||
{
|
||||
return $this->getConfig('index_analyzer');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
|
|
@ -43,6 +51,9 @@ class TypeConfig
|
|||
return $this->mapping;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string|null
|
||||
*/
|
||||
public function getModel()
|
||||
{
|
||||
return isset($this->config['persistence']['model']) ?
|
||||
|
|
@ -57,4 +68,19 @@ class TypeConfig
|
|||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string|null
|
||||
*/
|
||||
public function getSearchAnalyzer()
|
||||
{
|
||||
return $this->getConfig('search_analyzer');
|
||||
}
|
||||
|
||||
private function getConfig($key)
|
||||
{
|
||||
return isset($this->config[$key]) ?
|
||||
$this->config[$key] :
|
||||
null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue