Permalink
Browse files

add ability to configure nested mapping

``` yaml
foq_elastica:
    clients:
        default: { host: localhost, port: 9200 }
    indexes:
        website:
            client: default
            types:
                product:
                    mappings:
                        name: { type: string }
                        price: { type: float}
                        specifications:
                            type: object
                            properties:
                                name: {type: string}
                                value: {type: string, analyzer: keyword}
```
  • Loading branch information...
1 parent 193ca38 commit 679480e496023cc3a23690139664d87deccd3cb9 Julien Muetton committed Nov 22, 2012
Showing with 20 additions and 0 deletions.
  1. +20 −0 DependencyInjection/Configuration.php
@@ -267,6 +267,26 @@ protected function getMappingsNode()
->end()
->end()
->end()
+ ->arrayNode('properties')
+ ->useAttributeAsKey('name')
+ ->prototype('array')
+ ->treatNullLike(array())
+ ->addDefaultsIfNotSet()
+ ->children()
+ ->scalarNode('type')->defaultValue('string')->end()
+ ->scalarNode('boost')->end()
+ ->scalarNode('store')->end()
+ ->scalarNode('index')->end()
+ ->scalarNode('index_analyzer')->end()
+ ->scalarNode('search_analyzer')->end()
+ ->scalarNode('analyzer')->end()
+ ->scalarNode('term_vector')->end()
+ ->scalarNode('null_value')->end()
+ ->booleanNode('include_in_all')->defaultValue('true')->end()
+ ->scalarNode('lat_lon')->end()
+ ->end()
+ ->end()
+ ->end()
->end()
->end()
;

0 comments on commit 679480e

Please sign in to comment.