Splunk Search

splunk java sdk returns result fields in different order than requested.

spadhi
Engager

I am using java sdk to query splunk, but i am not getting the result in the order requested.
My search query looks like : search | table _time,A,B,C,D
But the result json is C,B,D,_time,A
I am using service.oneshotSearch(searchQuery, oneshotSearchArgs);
Can you please help here.
Is it a bug with Splunk SDK?

Tags (1)

Richfez
SplunkTrust
SplunkTrust

If I may ask a few clarifying questions -

  • are the results in alphabetical order?
  • are the results in any order you can tell?
  • why is this a problem and what impact does it have?

Thanks,
Rich

0 Karma

spadhi
Engager

Anyone here to help??

0 Karma

maggarwal28
Engager

@richgalloway Can you please help?

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Sorry. I don't have an answer.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Splunk Observability Cloud’s AI Assistant in Action Series: Analyzing and ...

This is the second post in our Splunk Observability Cloud’s AI Assistant in Action series, in which we look at ...

Elevate Your Organization with Splunk’s Next Platform Evolution

 Thursday, July 10, 2025  |  11AM PDT / 2PM EDT Whether you're managing complex deployments or looking to ...

Splunk Answers Content Calendar, June Edition

Get ready for this week’s post dedicated to Splunk Dashboards! We're celebrating the power of community by ...