<?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: Difference between the NOT and != operators? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Difference-between-the-NOT-and-operators/m-p/84637#M182064</link>
    <description>&lt;P&gt;Well, that mentions they're different, I want to know how they're different, why one (NOT) added some unnecessary terms to litsearch that broke one of my searches when the other (!=) did not.&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jul 2013 14:27:57 GMT</pubDate>
    <dc:creator>Jason</dc:creator>
    <dc:date>2013-07-04T14:27:57Z</dc:date>
    <item>
      <title>Difference between the NOT and != operators?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Difference-between-the-NOT-and-operators/m-p/84635#M182062</link>
      <description>&lt;P&gt;What is the difference between the &lt;CODE&gt;NOT&lt;/CODE&gt; operator and the &lt;CODE&gt;!=&lt;/CODE&gt; operator?&lt;/P&gt;

&lt;P&gt;I have always used &lt;CODE&gt;NOT&lt;/CODE&gt; up to this point, but am seeing some very strange behavior associated with it &lt;CODE&gt;today*&lt;/CODE&gt; and &lt;CODE&gt;!=&lt;/CODE&gt; seems to function as I intend.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;NOT&lt;/CODE&gt; seems to be adding seemingly unrelated terms to litsearch in the search inspector's "remote search" which cause the search to fail&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2013 07:59:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Difference-between-the-NOT-and-operators/m-p/84635#M182062</guid>
      <dc:creator>Jason</dc:creator>
      <dc:date>2013-07-04T07:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between the NOT and != operators?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Difference-between-the-NOT-and-operators/m-p/84636#M182063</link>
      <description>&lt;P&gt;Possibly what you're looking for&lt;BR /&gt;&lt;BR /&gt;
&lt;A href="http://splunk-base.splunk.com/answers/6981/which-is-better-not-or"&gt;Difference between NOT and !=&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2013 08:14:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Difference-between-the-NOT-and-operators/m-p/84636#M182063</guid>
      <dc:creator>RohiniJindam</dc:creator>
      <dc:date>2013-07-04T08:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between the NOT and != operators?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Difference-between-the-NOT-and-operators/m-p/84637#M182064</link>
      <description>&lt;P&gt;Well, that mentions they're different, I want to know how they're different, why one (NOT) added some unnecessary terms to litsearch that broke one of my searches when the other (!=) did not.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2013 14:27:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Difference-between-the-NOT-and-operators/m-p/84637#M182064</guid>
      <dc:creator>Jason</dc:creator>
      <dc:date>2013-07-04T14:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between the NOT and != operators?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Difference-between-the-NOT-and-operators/m-p/84638#M182065</link>
      <description>&lt;P&gt;From my point of view, NOT is like a logical operator rather than the exact "Not equal to operator" which should be considered as an arithmetic operator. Internally it should work like that as other languages, but sometimes it's output makes us think them the same.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2013 14:42:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Difference-between-the-NOT-and-operators/m-p/84638#M182065</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2013-07-04T14:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between the NOT and != operators?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Difference-between-the-NOT-and-operators/m-p/84639#M182066</link>
      <description>&lt;P&gt;The difference is that with &lt;CODE&gt;!=&lt;/CODE&gt; it's implied that the field exists, but does not have the value specified. So if the field is not found at all in the event, the search will not match.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;NOT field=&lt;/CODE&gt; on the other hand will check if the field has the specified value, and if it doesn't for whatever reason, it will match.&lt;/P&gt;

&lt;P&gt;(from &lt;A href="http://splunk-base.splunk.com/answers/43228/use-of-not-vs"&gt;http://splunk-base.splunk.com/answers/43228/use-of-not-vs&lt;/A&gt; )&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2013 18:42:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Difference-between-the-NOT-and-operators/m-p/84639#M182066</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-07-04T18:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between the NOT and != operators?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Difference-between-the-NOT-and-operators/m-p/672639#M230359</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Most Simplified Explanation&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;!=&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;is a field expression that returns every event that has a value in the field, where that value does not match the value you specify. Events that do not have a value in the field are not included in the results. For example, if you search for&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#FF6600"&gt;Location!="Calaveras Farms"&lt;/FONT&gt;, events that do not have&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Calaveras Farms&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;as the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Location&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;are returned.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="" href="https://docs.splunk.com/Documentation/Splunk/latest/Search/NOTexpressions" target="_blank" rel="noopener"&gt;Events that do not have&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Location&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;value are not included in the results&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;On the other hand,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;NOT&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;is an operator that returns every event except the events that contain the value you specify. This includes events that do not have a value in the field. For example, if you search using:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#FF6600"&gt;NOT Location="Calaveras Farms"&lt;/FONT&gt;, every event is returned except the events that contain the value “Calaveras Farms”.&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Search/NOTexpressions" target="_blank" rel="noopener"&gt;This includes events that do not have a&amp;nbsp;Location&amp;nbsp;value&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Here’s an example to illustrate the difference between the two methods. Suppose you have the following events:&lt;/FONT&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;U&gt;&lt;SPAN class=""&gt;Table&lt;/SPAN&gt;&lt;/U&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;ID Name Color Location&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;101M3&lt;/TD&gt;&lt;TD&gt;McIntosh&lt;/TD&gt;&lt;TD&gt;Chestnut&lt;/TD&gt;&lt;TD&gt;Marin Meadows&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;104F5&lt;/TD&gt;&lt;TD&gt;Lyra&lt;/TD&gt;&lt;TD&gt;Bay&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;104M6&lt;/TD&gt;&lt;TD&gt;Rutherford&lt;/TD&gt;&lt;TD&gt;Dun&lt;/TD&gt;&lt;TD&gt;Placer Pastures&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;101F2&lt;/TD&gt;&lt;TD&gt;Rarity&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Marin Meadows&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;102M7&lt;/TD&gt;&lt;TD&gt;Dash&lt;/TD&gt;&lt;TD&gt;Black&lt;/TD&gt;&lt;TD&gt;Calaveras Farms&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;102M1&lt;/TD&gt;&lt;TD&gt;Roan&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;101F6&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Chestnut&lt;/TD&gt;&lt;TD&gt;Marin Meadows&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;104F4&lt;/TD&gt;&lt;TD&gt;Pinkie&lt;/TD&gt;&lt;TD&gt;Sorrel&lt;/TD&gt;&lt;TD&gt;Placer Pastures&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;If you search with&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#FF6600"&gt;Location!="Calaveras Farms"&lt;/FONT&gt;, every event that has a value in the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Location&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;field, where that value does not match&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Calaveras Farms, is returned. Events that do not have a value in the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Location&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;field are not included in the results. The following events are returned:&lt;/P&gt;&lt;DIV class=""&gt;&lt;U&gt;&lt;SPAN class=""&gt;Output Table&lt;/SPAN&gt;&lt;/U&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;ID Name Color Location&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;101M3&lt;/TD&gt;&lt;TD&gt;McIntosh&lt;/TD&gt;&lt;TD&gt;Chestnut&lt;/TD&gt;&lt;TD&gt;Marin Meadows&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;104M6&lt;/TD&gt;&lt;TD&gt;Rutherford&lt;/TD&gt;&lt;TD&gt;Dun&lt;/TD&gt;&lt;TD&gt;Placer Pastures&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;101F2&lt;/TD&gt;&lt;TD&gt;Rarity&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Marin Meadows&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;101F6&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Chestnut&lt;/TD&gt;&lt;TD&gt;Marin Meadows&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;104F4&lt;/TD&gt;&lt;TD&gt;Pinkie&lt;/TD&gt;&lt;TD&gt;Sorrel&lt;/TD&gt;&lt;TD&gt;Placer Pastures&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you search with&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#FF6600"&gt;NOT Location="Calaveras Farms"&lt;/FONT&gt;, every event is returned except the events that contain the value&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Calaveras Farms. This includes events that do not have a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Location&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;value. The following events are returned:&lt;/P&gt;&lt;DIV class=""&gt;&lt;U&gt;&lt;SPAN class=""&gt;Output Table&lt;/SPAN&gt;&lt;/U&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;ID Name Color Location&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;101M3&lt;/TD&gt;&lt;TD&gt;McIntosh&lt;/TD&gt;&lt;TD&gt;Chestnut&lt;/TD&gt;&lt;TD&gt;Marin Meadows&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;104F5&lt;/TD&gt;&lt;TD&gt;Lyra&lt;/TD&gt;&lt;TD&gt;Bay&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;104M6&lt;/TD&gt;&lt;TD&gt;Rutherford&lt;/TD&gt;&lt;TD&gt;Dun&lt;/TD&gt;&lt;TD&gt;Placer Pastures&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;101F2&lt;/TD&gt;&lt;TD&gt;Rarity&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Marin Meadows&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;102M1&lt;/TD&gt;&lt;TD&gt;Roan&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;101F6&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Chestnut&lt;/TD&gt;&lt;TD&gt;Marin Meadows&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;104F4&lt;/TD&gt;&lt;TD&gt;Pinkie&lt;/TD&gt;&lt;TD&gt;Sorrel&lt;/TD&gt;&lt;TD&gt;Placer Pastures&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Sat, 23 Dec 2023 03:20:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Difference-between-the-NOT-and-operators/m-p/672639#M230359</guid>
      <dc:creator>zac</dc:creator>
      <dc:date>2023-12-23T03:20:39Z</dc:date>
    </item>
  </channel>
</rss>

