esJsonRDD only returns a single field rather than all fields

This topic is similar to the one found here. - 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, 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

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