<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error in 'search' command: Unable to parse the search: Right hand side of IN must be a collection of literals. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Error-in-search-command-Unable-to-parse-the-search-Right-hand/m-p/537734#M152033</link>
    <description>&lt;P&gt;Sorry, I forgot to mention what I am trying to get. Index=test has senders that are like 123google.com google123.com. So I want to see the results where sender in index=test contains wildcard phrases from the the sender field in the lookup table.&lt;/P&gt;&lt;P&gt;Does that make sense? For example...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Senders in indext=test:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;123google.com&amp;nbsp;&lt;/P&gt;&lt;P&gt;google123.com&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Wildcard sender phrases in lookup:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;*google1* (would match&lt;BR /&gt;*2google* (would not match&lt;/P&gt;</description>
    <pubDate>Thu, 28 Jan 2021 21:44:09 GMT</pubDate>
    <dc:creator>TheBravoSierra</dc:creator>
    <dc:date>2021-01-28T21:44:09Z</dc:date>
    <item>
      <title>Error in 'search' command: Unable to parse the search: Right hand side of IN must be a collection of literals.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Error-in-search-command-Unable-to-parse-the-search-Right-hand/m-p/537728#M152031</link>
      <description>&lt;P&gt;I'm trying to look for senders where they don't contain values from the lookup mimics.csv. Examples of values in the lookup is:&lt;/P&gt;&lt;P&gt;*google.com*&lt;/P&gt;&lt;P&gt;*yahoo.com*&lt;/P&gt;&lt;P&gt;I've already set WILDCARD(sender) in the definition.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the search I'm trying to do:&lt;BR /&gt;index=test&lt;BR /&gt;| search sender IN [inputlookup mimics.csv]&lt;BR /&gt;| table _time,mid,src_ip,sender,subject,recipient&lt;/P&gt;&lt;P&gt;But I keep getting this error:&amp;nbsp;&lt;BR /&gt;Error in 'search' command: Unable to parse the search: Right hand side of IN must be a collection of literals.&lt;SPAN&gt;'(sender = "*google.com*")' is not a literal.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 21:22:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Error-in-search-command-Unable-to-parse-the-search-Right-hand/m-p/537728#M152031</guid>
      <dc:creator>TheBravoSierra</dc:creator>
      <dc:date>2021-01-28T21:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: Error in 'search' command: Unable to parse the search: Right hand side of IN must be a collection of literals.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Error-in-search-command-Unable-to-parse-the-search-Right-hand/m-p/537732#M152032</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/230424"&gt;@TheBravoSierra&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The WILDCARD attribute of a lookup applies to the use of the lookup command, not the inputlookup command, so that's not relevant here.&lt;/P&gt;&lt;P&gt;The IN part of search is&lt;/P&gt;&lt;P&gt;sender IN (a,b,c,d,e)&lt;/P&gt;&lt;P&gt;and would not apply to wildcarded phrases like you are trying to do.&lt;/P&gt;&lt;P&gt;Simple way to do what you are doing is&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=test [ | inputlookup mimics.csv | fields sender ]
| table _time,mid,src_ip,sender,subject,recipient&lt;/LI-CODE&gt;&lt;P&gt;although without knowing what you are trying to get from your lookup, I don't know if that will give you what you want.&lt;/P&gt;&lt;P&gt;Note that subsearches do not need an additional pipeline 'search' command, you can add them directly to the initial search as above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;One way to see what the subsearch is passing to the outer search is to do this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup mimics.csv | fields sender | format&lt;/LI-CODE&gt;&lt;P&gt;and you will see the return value coming from the subsearch that will be used as part of the search.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 21:36:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Error-in-search-command-Unable-to-parse-the-search-Right-hand/m-p/537732#M152032</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2021-01-28T21:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: Error in 'search' command: Unable to parse the search: Right hand side of IN must be a collection of literals.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Error-in-search-command-Unable-to-parse-the-search-Right-hand/m-p/537734#M152033</link>
      <description>&lt;P&gt;Sorry, I forgot to mention what I am trying to get. Index=test has senders that are like 123google.com google123.com. So I want to see the results where sender in index=test contains wildcard phrases from the the sender field in the lookup table.&lt;/P&gt;&lt;P&gt;Does that make sense? For example...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Senders in indext=test:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;123google.com&amp;nbsp;&lt;/P&gt;&lt;P&gt;google123.com&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Wildcard sender phrases in lookup:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;*google1* (would match&lt;BR /&gt;*2google* (would not match&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 21:44:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Error-in-search-command-Unable-to-parse-the-search-Right-hand/m-p/537734#M152033</guid>
      <dc:creator>TheBravoSierra</dc:creator>
      <dc:date>2021-01-28T21:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: Error in 'search' command: Unable to parse the search: Right hand side of IN must be a collection of literals.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Error-in-search-command-Unable-to-parse-the-search-Right-hand/m-p/537738#M152034</link>
      <description>&lt;P&gt;So, my reply above should do that. If you run the | inputlookup command on its own as shown, you will see how that is affecting the search. It will give you something like&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;( ( sender="*google1*" ) OR ( sender="*2google*" ))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;so, from your index=test example data, the 'google123.com' event sender would match that search.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jan 2021 21:54:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Error-in-search-command-Unable-to-parse-the-search-Right-hand/m-p/537738#M152034</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2021-01-28T21:54:17Z</dc:date>
    </item>
  </channel>
</rss>

