Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot start the server from ./opa-es-filtering #115

Closed
ShanChathusanda93 opened this issue Jun 12, 2020 · 1 comment
Closed

Cannot start the server from ./opa-es-filtering #115

ShanChathusanda93 opened this issue Jun 12, 2020 · 1 comment

Comments

@ShanChathusanda93
Copy link

ShanChathusanda93 commented Jun 12, 2020

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

@ShanChathusanda93 ShanChathusanda93 changed the title Cannot get response from localhost:8080/posts API Cannot start the server from ./opa-es-filtering Jun 12, 2020
@ShanChathusanda93
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant