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

Store payload in separate DB #3

Open
JonasKunze opened this issue Aug 12, 2014 · 0 comments
Open

Store payload in separate DB #3

JonasKunze opened this issue Aug 12, 2014 · 0 comments
Assignees

Comments

@JonasKunze
Copy link
Member

Currently the payload is stored in a separate index. It seems only possible to store a string within a json so we have something like following:

esClient.prepareIndex(payloadIndex, TYPE,ID)
     .setSource(
          jsonBuilder().startObject().field(PAYLOAD_FIELD, payload
     ).endObject())

In the getPayload() method we therefore have this:

response.getSourceAsMap().get(PAYLOAD_FIELD)

This seems extremely inefficient. If we want to stay with ES here and there's really no way to store a raw string, we should at least replace the getSourceAsMap() with some string operation like response.getSourceAsString().substring(X).substring(0,Y);

@JonasKunze JonasKunze self-assigned this Aug 12, 2014
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