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

Some bugs foud #2

Open
zbi opened this issue Mar 10, 2016 · 0 comments
Open

Some bugs foud #2

zbi opened this issue Mar 10, 2016 · 0 comments

Comments

@zbi
Copy link

zbi commented Mar 10, 2016

Hello,

I really like the conception you made. Greate JOB.

But after test I found some issues.

  1. From version jackson 2.6.5, the code
jgen.writeRaw(",\"fields\"");
jgen.writeRawValue(OBJECT_MAPPER.writeValueAsString(doc.pojo));

will throw un exception.
Also with the OBJECT_MAPPER.writeValueAsString(doc.pojo)), we send a request with"fields":"{....}", that makes the fields type as String and cloudsearch does not like it. We need to use the following code:

The solution is to usejgen.writeObjectField("fields", doc.pojo);

That makes the fields with a json object

  1. ZoneDateTime could not be serialized,

Solution: we need to configure WRITE_DATES_AS_TIMESTAMPS to false and registry module JavaTimeModule which is from jackson-datatype-jsr310

Again, great job!

Thanks

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