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

[Ingest] Add meta processor that allows to modify the metadata attributes of document being processed #14991

Merged
merged 1 commit into from Nov 26, 2015

Conversation

Projects
None yet
2 participants
@martijnvg
Member

martijnvg commented Nov 24, 2015

This also adds template support only for the new meta processor. I opened #14990 to discuss how template support should further be adopted in ingest.

PR for #14644

@javanna

View changes

Show outdated Hide outdated .../main/java/org/elasticsearch/plugin/ingest/PipelineExecutionService.java
out.writeMap(ingestDocument.getSource());
}
@Override
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
builder.startObject(Fields.DOCUMENT);
builder.field(Fields.MODIFIED, ingestDocument.isModified());
builder.field(Fields.MODIFIED, ingestDocument.isSourceModified());
builder.field(Fields.INDEX, ingestDocument.getMetadata(INDEX));
builder.field(Fields.TYPE, ingestDocument.getMetadata(TYPE));
builder.field(Fields.ID, ingestDocument.getMetadata(ID));

This comment has been minimized.

@javanna

javanna Nov 26, 2015

Member

we need to print out routing parent timestamp and ttl here too?

@javanna

javanna Nov 26, 2015

Member

we need to print out routing parent timestamp and ttl here too?

This comment has been minimized.

@martijnvg

martijnvg Nov 26, 2015

Member

oops, I'll add it.

@martijnvg

martijnvg Nov 26, 2015

Member

oops, I'll add it.

@javanna

View changes

Show outdated Hide outdated ...sticsearch/plugin/ingest/transport/simulate/SimulatePipelineRequest.java
assertThat(ingestDocument.getMetadata(metaData), Matchers.equalTo("some value"));
}
}

This comment has been minimized.

@javanna

javanna Nov 26, 2015

Member

Is it worth to test what happens when the mustache expression evaluation breaks?

@javanna

javanna Nov 26, 2015

Member

Is it worth to test what happens when the mustache expression evaluation breaks?

@javanna

This comment has been minimized.

Show comment
Hide comment
@javanna

javanna Nov 26, 2015

Member

left a few comments, I like it!

Member

javanna commented Nov 26, 2015

left a few comments, I like it!

@javanna

View changes

Show outdated Hide outdated .../main/java/org/elasticsearch/plugin/ingest/PipelineExecutionService.java
@javanna

View changes

Show outdated Hide outdated ...sticsearch/plugin/ingest/transport/simulate/SimulatePipelineRequest.java
@javanna

This comment has been minimized.

Show comment
Hide comment
@javanna

javanna Nov 26, 2015

Member

left two super minor comments, LGTM though, no need for another review

Member

javanna commented Nov 26, 2015

left two super minor comments, LGTM though, no need for another review

@martijnvg martijnvg merged commit 9d1fa0d into elastic:feature/ingest Nov 26, 2015

@martijnvg martijnvg removed the review label Nov 26, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment