O código apresentado no tutorial não está funcionando.
Estou obtendo como resposta o seguinte JSON:
{ "error": { "root_cause": [ { "type": "mapper_parsing_exception", "reason": "Root mapping definition has unsupported parameters: [v1 : {all={analyzer=portuguese, type=text}, properties={preco={type=float}, subcategoria={analyzer=portuguese, fields={original={type=keyword}}, type=text}, categoria={analyzer=portuguese, fields={original={type=keyword}}, type=text}, nome={analyzer=portuguese, fields={original={type=keyword}}, type=text}, fornecedor={fields={original={index=notanalyzed, type=keyword}}, type=text}, tags={analyzer=portuguese, index=analyzed, fields={original={type=keyword}}, type=string}}}]" } ], "type": "mapper_parsing_exception", "reason": "Failed to parse mapping [doc]: Root mapping definition has unsupported parameters: [v1 : {all={analyzer=portuguese, type=text}, properties={preco={type=float}, subcategoria={analyzer=portuguese, fields={original={type=keyword}}, type=text}, categoria={analyzer=portuguese, fields={original={type=keyword}}, type=text}, nome={analyzer=portuguese, fields={original={type=keyword}}, type=text}, fornecedor={fields={original={index=not_analyzed, type=keyword}}, type=text}, tags={analyzer=portuguese, index=analyzed, fields={original={type=keyword}}, type=string}}}]", "caused_by": { "type": "mapper_parsing_exception", "reason": "Root mapping definition has unsupported parameters: [v1 : {all={analyzer=portuguese, type=text}, properties={preco={type=float}, subcategoria={analyzer=portuguese, fields={original={type=keyword}}, type=text}, categoria={analyzer=portuguese, fields={original={type=keyword}}, type=text}, nome={analyzer=portuguese, fields={original={type=keyword}}, type=text}, fornecedor={fields={original={index=notanalyzed, type=keyword}}, type=text}, tags={analyzer=portuguese, index=analyzed, fields={original={type=keyword}}, type=string}}}]" } }, "status": 400 }