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

Allow JSON string in Elasticsearch Flow and Sink #1825

Closed
djm1329 opened this issue Jul 9, 2019 · 4 comments
Closed

Allow JSON string in Elasticsearch Flow and Sink #1825

djm1329 opened this issue Jul 9, 2019 · 4 comments

Comments

@djm1329
Copy link

djm1329 commented Jul 9, 2019

Short description

ElasticsearchFlow (and ElasticsearchSink) are missing a way to pass strings that already represent JSON docs.

Details

It appears the flow wants to convert whatever is flowing through to a string itself (using spray json). The use case I am thinking of is where the user of the connector already has a JSON string at hand (read from a file say, or obtained via some other means). Right now, AFAICT the user needs to pre-parse such a string to a JsValue and pass that, only to have the flow re-serialize to a string.

@2m
Copy link
Member

2m commented Jul 10, 2019

Hi @douglas, this sounds good to me as additional API. Are you willing to work on a PR to implement this? :)

@djm1329
Copy link
Author

djm1329 commented Jul 10, 2019 via email

@ennru
Copy link
Member

ennru commented Aug 6, 2019

I looked into it more and discovered it is already possible with the Scala DSL. So I added test cases and opened the Java API for it in #1862.

@ennru
Copy link
Member

ennru commented Aug 7, 2019

Fixed with #1862

@ennru ennru closed this as completed Aug 7, 2019
@ennru ennru added this to the 1.1.1 milestone Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants