Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
0ae84d56c7
|
@ -299,6 +299,7 @@ class Configuration implements ConfigurationInterface
|
|||
->append($this->getParentNode())
|
||||
->append($this->getAllNode())
|
||||
->append($this->getTimestampNode())
|
||||
->append($this->getTtlNode())
|
||||
->end()
|
||||
;
|
||||
|
||||
|
@ -669,4 +670,24 @@ class Configuration implements ConfigurationInterface
|
|||
|
||||
return $node;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the array node used for "_ttl"
|
||||
*/
|
||||
protected function getTtlNode()
|
||||
{
|
||||
$builder = new TreeBuilder();
|
||||
$node = $builder->root('_ttl');
|
||||
|
||||
$node
|
||||
->children()
|
||||
->scalarNode('enabled')->defaultValue(true)->end()
|
||||
->scalarNode('default')->end()
|
||||
->scalarNode('store')->end()
|
||||
->scalarNode('index')->end()
|
||||
->end()
|
||||
;
|
||||
|
||||
return $node;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -249,6 +249,9 @@ class FOSElasticaExtension extends Extension
|
|||
if (isset($type['_timestamp'])) {
|
||||
$this->indexConfigs[$indexName]['config']['mappings'][$name]['_timestamp'] = $type['_timestamp'];
|
||||
}
|
||||
if (isset($type['_ttl'])) {
|
||||
$this->indexConfigs[$indexName]['config']['mappings'][$name]['_ttl'] = $type['_ttl'];
|
||||
}
|
||||
if (!empty($type['dynamic_templates'])) {
|
||||
$this->indexConfigs[$indexName]['config']['mappings'][$name]['dynamic_templates'] = array();
|
||||
foreach ($type['dynamic_templates'] as $templateName => $templateData) {
|
||||
|
|
Loading…
Reference in a new issue