Skip to content

hide null-valued metadata fields from WriteableIngestDocument#toXContent #16557

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

Merged
merged 1 commit into from
Feb 10, 2016

Conversation

talevy
Copy link
Contributor

@talevy talevy commented Feb 9, 2016

Currently, null-valued metadata fields show up when rendering IngestDocuments in responses.

e.g.

{
   "docs": [
      {
         "processor_results": [
            {
               "tag": "processor_2",
               "doc": {
                  "_parent": null,
                  "_timestamp": null,
                  "_routing": null,
                  "_id": "_id",
                  "_index": "_index",
                  "_ttl": null,
                  "_type": "_type",
                  "_source": {
                     "flags": "new|hot|super|fun|interesting"
                  },
                  "_ingest": {
                     "timestamp": "2016-02-09T20:05:27.575+0000"
                  }
               }
            },
...

This PR removes such values from the response, rendering the above as follows:

{
   "docs": [
      {
         "processor_results": [
            {
               "tag": "processor_2",
               "doc": {
                  "_index": "_index",
                  "_id": "_id",
                  "_type": "_type",
                  "_source": {
                     "flags": "new|hot|super|fun|interesting"
                  },
                  "_ingest": {
                     "timestamp": "2016-02-09T20:51:21.137+0000"
                  }
               }
            },
...

@talevy talevy added >enhancement v5.0.0-alpha1 :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP labels Feb 9, 2016
@talevy talevy force-pushed the ingest_hide_null_metadata branch from ee2ba69 to f9453e5 Compare February 9, 2016 20:58
@martijnvg
Copy link
Member

LGTM

talevy added a commit that referenced this pull request Feb 10, 2016
hide null-valued metadata fields from WriteableIngestDocument#toXContent
@talevy talevy merged commit 321c463 into elastic:master Feb 10, 2016
@talevy talevy deleted the ingest_hide_null_metadata branch February 10, 2016 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP >enhancement v5.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants