Cannot start the server from ./opa-es-filtering
ShanChathusanda93 opened this issue · comments
I am trying this tool and I followed the provided readme[1]. When I start the server from ./opa-es-filtering
an error is occurred as follows. If you can provide a solution it will be grateful.
panic: elastic: Error 400 (Bad Request): The mapping definition cannot be nested under a type [_doc] unless include_type_name is set to true. [type=illegal_argument_exception] goroutine 1 [running]: main.main() /opa-elastic/contrib/data_filter_elasticsearch/cmd/opa-es-filtering/main.go:37 +0x38c
[1] https://github.com/open-policy-agent/contrib/blob/master/data_filter_elasticsearch/README.md
Thanks
This was happened because in elasticsearch 7.x.x version we do not need to send the _doc
type for mappings. Please refer[1] for more details. If you can provide the support for the 7.x.x versions also it would be great. Since the problem is solved closing the ticket.
[1] https://stackoverflow.com/questions/58824489/where-to-put-include-type-name-in-config-exs