Elasticsearch mapping with nested objects

It is my mapping. product_base is nested object also manufacturer is child of product_base and nested object. When i create my doc, if product_base count more than 1 , seems product_base.0, product_base.1 . However i couldnt use filter normally. Is my mapping wrong?

Thank you

$params = 'index' => product,
         'body'  => [
            'mappings' => [
               '_source'    => [
                  'enabled' => true,
               ],
               'properties' => [
                  'id_product'        => ['type' => 'integer'],
                  'id_product_base'   => ['type' => 'integer'],
                  

                  'lang' => [
                     'type'       => 'nested',
                     'properties' => [
                        'id_product'  => ['type' => 'integer'],
                        'id_lang'     => ['type' => 'byte'],
                        'name'        => ['type' => 'text']
                        

                     ],
                  ],

                  'product_base' => [

                     'type'       => 'nested',
                     'properties' => [
                        'id_product_base'       => ['type' => 'integer'],
                        'id_manufacturer'       => ['type' => 'integer'],
                        'id_product_zone_group' => ['type' => 'text'],
                        'status'                => ['type' => 'byte'],

                        'manufacturer' => [

                           'type'       => 'nested',
                           'properties' => [
                              'id_manufacturer' => ['type' => 'integer'],
                              'name'            => ['type' => 'text'],
                              'status'          => ['type' => 'byte'],

                           ],
                        ],

                       ]

                     ]

                  ]

                  ]
                  ]
                  ]
                ];

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.