<?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: Trouble using mvfind on multivalue field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Trouble-using-mvfind-on-multivalue-field/m-p/278561#M84114</link>
    <description>&lt;P&gt;I want to exclude events that DO contain the string. Using isnull() shows every single event regardless. Using isnotnull() shows 0 events, so neither are working correctly.&lt;/P&gt;</description>
    <pubDate>Mon, 12 Oct 2015 19:55:17 GMT</pubDate>
    <dc:creator>techusky</dc:creator>
    <dc:date>2015-10-12T19:55:17Z</dc:date>
    <item>
      <title>Trouble using mvfind on multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trouble-using-mvfind-on-multivalue-field/m-p/278557#M84110</link>
      <description>&lt;P&gt;I am trying to exclude results from my search if a certain string occurs in one of the hyperlinks in the results. The relevant part of the JSON that is sent to Splunk is listed below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"hyperlinks":[{"url":"http://www.url1.com"},{"url":"http://www.url2.com"},{"url":"http://www.url3.com"},{"url":"http://www.url4.com"},{"url":"http://www.url5.com"}]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So let's say that I want to exclude any search results if "url2" is in the hyperlinks field. What I've been trying hasn't been working:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;where NOT mvfind(hyperlinks, "url2")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Including that where clause in my search gives me the following error:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Error in 'where' command: Typechecking failed. 'XOR' only takes boolean arguments.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Oct 2015 17:48:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trouble-using-mvfind-on-multivalue-field/m-p/278557#M84110</guid>
      <dc:creator>techusky</dc:creator>
      <dc:date>2015-10-12T17:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble using mvfind on multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trouble-using-mvfind-on-multivalue-field/m-p/278558#M84111</link>
      <description>&lt;P&gt;&lt;CODE&gt;mvfind()&lt;/CODE&gt; returns a number or null: &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/CommonEvalFunctions"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/CommonEvalFunctions&lt;/A&gt;&lt;BR /&gt;
Try wrapping it in &lt;CODE&gt;isnull()&lt;/CODE&gt; instead of using &lt;CODE&gt;NOT&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2015 19:24:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trouble-using-mvfind-on-multivalue-field/m-p/278558#M84111</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2015-10-12T19:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble using mvfind on multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trouble-using-mvfind-on-multivalue-field/m-p/278559#M84112</link>
      <description>&lt;P&gt;Doesn't look like that did the trick. While I'm no longer getting an error, the results aren't actually being excluded. I just tried:&lt;BR /&gt;
    where isnull(mvfind(hyperlinks, "url2"))&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2015 19:44:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trouble-using-mvfind-on-multivalue-field/m-p/278559#M84112</guid>
      <dc:creator>techusky</dc:creator>
      <dc:date>2015-10-12T19:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble using mvfind on multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trouble-using-mvfind-on-multivalue-field/m-p/278560#M84113</link>
      <description>&lt;P&gt;Do you want to exclude events that contain the string or that don't contain the string?&lt;/P&gt;

&lt;P&gt;If the former, use &lt;CODE&gt;isnotnull()&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2015 19:46:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trouble-using-mvfind-on-multivalue-field/m-p/278560#M84113</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2015-10-12T19:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble using mvfind on multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trouble-using-mvfind-on-multivalue-field/m-p/278561#M84114</link>
      <description>&lt;P&gt;I want to exclude events that DO contain the string. Using isnull() shows every single event regardless. Using isnotnull() shows 0 events, so neither are working correctly.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2015 19:55:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trouble-using-mvfind-on-multivalue-field/m-p/278561#M84114</guid>
      <dc:creator>techusky</dc:creator>
      <dc:date>2015-10-12T19:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble using mvfind on multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trouble-using-mvfind-on-multivalue-field/m-p/278562#M84115</link>
      <description>&lt;P&gt;So this means you always get null - make sure your field is being extracted properly and is actually called &lt;CODE&gt;hyperlinks&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2015 19:57:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trouble-using-mvfind-on-multivalue-field/m-p/278562#M84115</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2015-10-12T19:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble using mvfind on multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trouble-using-mvfind-on-multivalue-field/m-p/278563#M84116</link>
      <description>&lt;P&gt;I know the field is called hyperlinks. However, when I usually access the URLs in events, let's say to print the events in a table, I do so with: | table hyperlinks{}.url&lt;/P&gt;

&lt;P&gt;However, I can't use that bracket notation with the mvfind command, or I get an error: "Error in 'where' command: The expression is malformed. Expected )."&lt;/P&gt;

&lt;P&gt;Which is what led me to try using just "hyperlinks" in the mvfind command.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2015 20:01:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trouble-using-mvfind-on-multivalue-field/m-p/278563#M84116</guid>
      <dc:creator>techusky</dc:creator>
      <dc:date>2015-10-12T20:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble using mvfind on multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trouble-using-mvfind-on-multivalue-field/m-p/278564#M84117</link>
      <description>&lt;P&gt;If the field is called &lt;CODE&gt;hyperlinks{}.url&lt;/CODE&gt; in &lt;CODE&gt;table&lt;/CODE&gt;, then &lt;CODE&gt;hyperlinks&lt;/CODE&gt; isn't going to magically work in &lt;CODE&gt;eval&lt;/CODE&gt;. Curly braces (and the dot, actually) are special characters in eval expressions, so you will need to enclose the field name in single quotes: &lt;CODE&gt;'hyperlinks{}.url'&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2015 20:20:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trouble-using-mvfind-on-multivalue-field/m-p/278564#M84117</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2015-10-12T20:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble using mvfind on multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trouble-using-mvfind-on-multivalue-field/m-p/278565#M84118</link>
      <description>&lt;P&gt;Have you tried using spath?  There is an example here of using spath with JSON&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.0/SearchReference/spath"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.0/SearchReference/spath&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Oct 2015 20:27:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trouble-using-mvfind-on-multivalue-field/m-p/278565#M84118</guid>
      <dc:creator>walkerhound</dc:creator>
      <dc:date>2015-10-12T20:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble using mvfind on multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trouble-using-mvfind-on-multivalue-field/m-p/278566#M84119</link>
      <description>&lt;P&gt;D'oh! I didn't realize about needing to use the single quotes. That was all I was missing. Everything is working as expected now. Thanks for the help.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2015 15:20:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trouble-using-mvfind-on-multivalue-field/m-p/278566#M84119</guid>
      <dc:creator>techusky</dc:creator>
      <dc:date>2015-10-13T15:20:19Z</dc:date>
    </item>
  </channel>
</rss>

