# esJsonRDD only returns a single field rather than all fields

**URL:** <https://discuss.elastic.co/t/esjsonrdd-only-returns-a-single-field-rather-than-all-fields/147216>\
**Category:** Elasticsearch\
**Tags:** es-hadoop\
**Created:** [September 4, 2018, 1:32pm UTC](https://discuss.elastic.co/t/esjsonrdd-only-returns-a-single-field-rather-than-all-fields/147216 "2018-09-04T13:32:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SKing](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@SKing](https://discuss.elastic.co/u/SKing)\
**Post date:** [September 4, 2018, 1:32pm UTC](https://discuss.elastic.co/t/esjsonrdd-only-returns-a-single-field-rather-than-all-fields/147216/1 "2018-09-04T13:32:18Z")

</div>

[This topic is similar to the one found here.](https://discuss.elastic.co/t/esrdd-not-returning-script-fields-values/40077) - esRdd not returning script field values.

Like the poster of the linked message.

My query

> {"query": {"bool" : {"must\_not": {"term": {"request": "configuration.log.message"}},"must":[{"exists":{"field":"total\_execution\_time\_ms"}}]}}}

When run using Dev Tools in kibana console will return all the fields in the Elasticsearch entries.

However, when run using

> JavaESSpark.esJsonRdd( , \<index\_name\>, {"query": {"bool" : {"must\_not": {"term": {"request": "configuration.log.message"}},"must":[{"exists":{"field":"total\_execution\_time\_ms"}}]}}})

only one field, the session-id, is return.

Aside: [From this Question - Passing variables to es-query](https://discuss.elastic.co/t/passing-variables-to-es-query/46895), I no longer specified specific fields and just looked for the Elasticsearch entry (with all fields) with a view to filtering out the fields I wanted via a transform function.

Previously the query had been

> {"\_source":["total\_execution\_time\_ms","templating\_time\_ms", "responseServices\_time\_ms", "requestServices\_time\_ms", "substitutions\_time\_ms", "session-id", "time\_of\_log"],"query": {"bool" : {"must\_not": {"term": {"request": "configuration.log.message"}},"must":[{"exists":{"field":"total\_execution\_time\_ms"}}]}}}

But with the same problem (only session-id name-value being returned)

Thank you

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 2, 2018, 1:32pm UTC](https://discuss.elastic.co/t/esjsonrdd-only-returns-a-single-field-rather-than-all-fields/147216/2 "2018-10-02T13:32:21Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
