<?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 Why does my search &amp;quot;tag=x NOT tag=y&amp;quot; returns &amp;quot;No results found&amp;quot;? in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-does-my-search-quot-tag-x-NOT-tag-y-quot-returns-quot-No/m-p/172388#M16552</link>
    <description>&lt;P&gt;I am very confused as to why I am getting "No results found" when searching for events matching tags=x but has no properties which would assign tag y to it. The reason for this search would be to weed out events with both tags but I would have thought if tag y is orthogonal to tag x, all events for tag x should appear. Very confused. &lt;/P&gt;

&lt;P&gt;I am working with the Splunk Windows add-on and here is a real search that boggles my mind. First, let me define two tags used in the add-on:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;lock eventtype=windows_account_lockout
port eventtype=script_listeningports,eventtype=windows_firewall_port_listening
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;These two tags look very orthogonal. None of the lock events should match the port tag and vice versa.&lt;/P&gt;

&lt;P&gt;When I run the following search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;tag=port NOT tag=lock
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get back events with tag port included. If I remove the NOT statement, nothing changes in terms of tags.&lt;/P&gt;

&lt;P&gt;Flip the search like so:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;tag=lock NOT tag=port
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It comes back stating "No results found" yet when I look at the different tags associated with just the search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;tag=lock
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;none of the tags include port so the NOT part shouldn't exclude any data. What is going on in this situation? Why the results I am seeing? I was in the process of implementing an app written by Splunk which does precisely a search like this and it is causing the dashboard to fail.&lt;/P&gt;</description>
    <pubDate>Fri, 17 Oct 2014 06:14:33 GMT</pubDate>
    <dc:creator>coleman07</dc:creator>
    <dc:date>2014-10-17T06:14:33Z</dc:date>
    <item>
      <title>Why does my search "tag=x NOT tag=y" returns "No results found"?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-does-my-search-quot-tag-x-NOT-tag-y-quot-returns-quot-No/m-p/172388#M16552</link>
      <description>&lt;P&gt;I am very confused as to why I am getting "No results found" when searching for events matching tags=x but has no properties which would assign tag y to it. The reason for this search would be to weed out events with both tags but I would have thought if tag y is orthogonal to tag x, all events for tag x should appear. Very confused. &lt;/P&gt;

&lt;P&gt;I am working with the Splunk Windows add-on and here is a real search that boggles my mind. First, let me define two tags used in the add-on:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;lock eventtype=windows_account_lockout
port eventtype=script_listeningports,eventtype=windows_firewall_port_listening
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;These two tags look very orthogonal. None of the lock events should match the port tag and vice versa.&lt;/P&gt;

&lt;P&gt;When I run the following search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;tag=port NOT tag=lock
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get back events with tag port included. If I remove the NOT statement, nothing changes in terms of tags.&lt;/P&gt;

&lt;P&gt;Flip the search like so:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;tag=lock NOT tag=port
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It comes back stating "No results found" yet when I look at the different tags associated with just the search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;tag=lock
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;none of the tags include port so the NOT part shouldn't exclude any data. What is going on in this situation? Why the results I am seeing? I was in the process of implementing an app written by Splunk which does precisely a search like this and it is causing the dashboard to fail.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Oct 2014 06:14:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-does-my-search-quot-tag-x-NOT-tag-y-quot-returns-quot-No/m-p/172388#M16552</guid>
      <dc:creator>coleman07</dc:creator>
      <dc:date>2014-10-17T06:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my search "tag=x NOT tag=y" returns "No results found"?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-does-my-search-quot-tag-x-NOT-tag-y-quot-returns-quot-No/m-p/172389#M16553</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Can you confirm that:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;search tag=port &lt;STRONG&gt;OK&lt;/STRONG&gt; &lt;/LI&gt;
&lt;LI&gt;search tag=lock &lt;STRONG&gt;OK&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;search tag=port NOT tag=lock &lt;STRONG&gt;OK&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;search tag=lock NOT tag=port &lt;STRONG&gt;NOT OK&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;That doesn't make sense. Can you share the complete search ? Do you make some filters before ?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Oct 2014 09:53:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-does-my-search-quot-tag-x-NOT-tag-y-quot-returns-quot-No/m-p/172389#M16553</guid>
      <dc:creator>bgaignon</dc:creator>
      <dc:date>2014-10-17T09:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my search "tag=x NOT tag=y" returns "No results found"?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-does-my-search-quot-tag-x-NOT-tag-y-quot-returns-quot-No/m-p/172390#M16554</link>
      <description>&lt;P&gt;I did confirm it while I wrote the question. I wanted to be sure that both the lock tag and port tag produced data. I am not clear what you mean by complete search. The two lines above are the complete search.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Oct 2014 20:38:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-does-my-search-quot-tag-x-NOT-tag-y-quot-returns-quot-No/m-p/172390#M16554</guid>
      <dc:creator>coleman07</dc:creator>
      <dc:date>2014-10-17T20:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my search "tag=x NOT tag=y" returns "No results found"?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-does-my-search-quot-tag-x-NOT-tag-y-quot-returns-quot-No/m-p/172391#M16555</link>
      <description>&lt;P&gt;I looked at the job inspector and the LISP code produced by it. The following LISP code corresponds to the search: "tag=port NOT tag=lock":&lt;BR /&gt;
[AND [OR sourcetype::script:listeningports [AND sourcetype::&lt;EM&gt;:Security [OR 4957 861 source::&lt;/EM&gt;]]][OR[NOT source::&lt;EM&gt;][NOT sourcetype::&lt;/EM&gt;:security]]]&lt;/P&gt;

&lt;P&gt;Whereas the search for "tag=lock NOT tag=port" results in this LISP code:&lt;BR /&gt;
[AND sourcetype::*:security [NOT sourcetype::script:listeningport][OR 4740 644 source::*][OR[NOT source::&lt;EM&gt;][NOT sourcetype::&lt;/EM&gt;:security]]]&lt;/P&gt;

&lt;P&gt;Because the OR in the first code statement short circuits the NOT statements, it appears this is why you get events from that search. If I am reading the LISP code correctly for the second search, it appears to boil down to [AND sourcetype::&lt;EM&gt;:Security [NOT sourcetype::&lt;/EM&gt;:Security]]  which I assume would produce no results and this seems like a bug in the compiler for creating the search. Am I correct? &lt;/P&gt;</description>
      <pubDate>Mon, 20 Oct 2014 21:36:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-does-my-search-quot-tag-x-NOT-tag-y-quot-returns-quot-No/m-p/172391#M16555</guid>
      <dc:creator>coleman07</dc:creator>
      <dc:date>2014-10-20T21:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my search "tag=x NOT tag=y" returns "No results found"?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-does-my-search-quot-tag-x-NOT-tag-y-quot-returns-quot-No/m-p/172392#M16556</link>
      <description>&lt;P&gt;I have this same problem with v6.0. It appears that NOT does not work with tags. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Apr 2015 05:08:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-does-my-search-quot-tag-x-NOT-tag-y-quot-returns-quot-No/m-p/172392#M16556</guid>
      <dc:creator>joebensimo</dc:creator>
      <dc:date>2015-04-28T05:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my search "tag=x NOT tag=y" returns "No results found"?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-does-my-search-quot-tag-x-NOT-tag-y-quot-returns-quot-No/m-p/172393#M16557</link>
      <description>&lt;P&gt;If this is a problem, it has to do with using eventtypes and as such, I suspect that it only is a problem with eventtypes that use wildcards.  Will you list out your eventtypes?&lt;/P&gt;

&lt;P&gt;v6 works fine when using tags for index-time extracted field KVPs for tags.&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2015 23:46:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-does-my-search-quot-tag-x-NOT-tag-y-quot-returns-quot-No/m-p/172393#M16557</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-05-05T23:46:05Z</dc:date>
    </item>
  </channel>
</rss>

