Splunk Search

Error Message About Literals

genesiusj
Builder

Hello,
One of my biggest pet peeves about software is the lack of information around error messages. Obviously, a developer wrote the error code and its associated message. However, most software has a vast black hole around such messages.

Case is point.
"Error in 'search' command: Unable to parse the search: Right hand side of IN must be a collection of literals. '(localrefid = "WW201929400001699")' is not a literal."

If I Google this error "Unable to parse the search: Right hand side of IN must be a collection of literals. ", I receive ONE hit.
link text

Searching this page for literal leads to
link text

Which in turn leads to NOWHERE, none of the links work.

Here is my code.

index="test"
    AND priority="INFO"
    AND ("STARTED" OR "FINISHED") 
    AND (localrefid IN 
    [ search index="test"
        AND priority="INFO"
        AND (localrefid!="12345" AND localrefid!="null" OR localrefid!="")
        AND ("STARTED" OR "FINISHED") 
    | dedup localrefid 
    | table localrefid ]
    OR token IN
    [ search index="test"
        AND priority="INFO"
        AND localrefid!="12345"
        AND (token!="null" AND token!="")
        AND ("STARTED" OR "FINISHED") 
    | dedup token 
    | table token ] ) 
| dedup _raw
| rex field=_raw "(FINISHED|STARTED\s)\:\s(?<transMethod>\w*)\s" 
| rex field=_raw "Total Time\s(?<methodTime>\d*\.?\d*)\sseconds" 
| eval methodTime=round(methodTime,3) 
| transaction localrefid, token
| sort +_time, localrefid, token 
| table _time, appName, transMethod, localrefid, token, eventcount, methodTime, _raw

Thanks in advance for your assistance with this undocumented error (at least in my search of the Internet), and for dealing with my pet peeve. 🙂

God bless,
Genesius

Tags (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

IN requires a comma-separated list of field names, numbers, or strings. Run the subsearches alone and you'll find they are not returning such output. Creative use of the format command may be able to remedy that.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Observability Simplified: Combining User Experience, Application Performance & ...

Tech Talk Observability Simplified: Combining User Experience, Application Performance & Network ...

Event Series May & June: From Network Visibility to Service Intelligence

Unifying the Network: Moving from Alert Noise to Service Intelligence with Splunk ITSI In today’s hybrid ...

Global Splunk User Group Events: May + June 2026

Your Splunk Community Awaits: Discover Upcoming User Group Events Worldwide    Staying ahead in the fast-paced ...