<?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: OR not working properly in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/OR-not-working-properly/m-p/339351#M165485</link>
    <description>&lt;P&gt;@lcharpentier, if you are on &lt;CODE&gt;Splunk Enterprise 6.6&lt;/CODE&gt; or higher you can try search with &lt;CODE&gt;IN&lt;/CODE&gt;clause&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;YourBaseSearch&amp;gt; finalCalledPartyNumber IN (331420, 331088, 331951, 331954, 331138, 331443, 333500, 331490, 332690, 332844, 332846, 332886, 331126, 332510, 333469, 332519, 331200, 331116, 332533, 331028, 333292, 331027)
| &amp;lt;YourRemainingSearch&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you are on previous version you should use &lt;CODE&gt;&amp;lt;fieldName&amp;gt;=value1 OR &amp;lt;fieldName&amp;gt;=value1 OR ...&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;YourBaseSearch&amp;gt; finalCalledPartyNumber=331420 OR finalCalledPartyNumber=331088 OR finalCalledPartyNumber=331951 OR finalCalledPartyNumber=331954 OR finalCalledPartyNumber=331138 OR finalCalledPartyNumber=331443 OR finalCalledPartyNumber=333500 OR finalCalledPartyNumber=331490 OR finalCalledPartyNumber=332690 OR finalCalledPartyNumber=332844 OR finalCalledPartyNumber=332846 OR finalCalledPartyNumber=332886 OR finalCalledPartyNumber=331126 OR finalCalledPartyNumber=332510 OR finalCalledPartyNumber=333469 OR finalCalledPartyNumber=332519 OR finalCalledPartyNumber=331200 OR finalCalledPartyNumber=331116 OR finalCalledPartyNumber=332533 OR finalCalledPartyNumber=331028 OR finalCalledPartyNumber=333292 OR finalCalledPartyNumber=331027
| &amp;lt;YourRemainingSearch&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Just placing &lt;CODE&gt;OR &amp;lt;number&amp;gt;&lt;/CODE&gt; searches for the number across your raw event not just for the value of &lt;CODE&gt;field finalCalledPartyNumber&lt;/CODE&gt;. I am expecting your logs have EPOCH time or some part of your _raw content is matching your search term. You can see in event mode or use highlight command to verify as to why those events are getting selected.&lt;BR /&gt;
You can also consider using wildcard for field value if possible like &lt;CODE&gt;finalCalledPartyNumber="33*"&lt;/CODE&gt; (if applicable).&lt;/P&gt;</description>
    <pubDate>Tue, 31 Oct 2017 09:42:14 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2017-10-31T09:42:14Z</dc:date>
    <item>
      <title>OR not working properly</title>
      <link>https://community.splunk.com/t5/Splunk-Search/OR-not-working-properly/m-p/339349#M165483</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I tried to run a report on multiple number from a specific field named "finalCalledPartyNumber" using the OR operator but I get results with other number as well. So I tried with bracket () but this time job failed, any idea how to do that ?&lt;/P&gt;

&lt;P&gt;Here is my request:&lt;/P&gt;

&lt;P&gt;finalCalledPartyNumber=331420 OR 331088 OR 331951 OR 331954 OR 331138 OR 331443 OR 333500 OR 331490 OR 332690 OR 332844 OR 332846 OR 332886 OR 331126 OR 332510 OR 333469 OR 332519 OR 331200 OR 331116 OR 332533 OR 331028 OR 333292 OR 331027  | eval Date=strftime(dateTimeConnect, "%H:%M:%S %d-%m-%Y") | top callingPartyNumber, finalCalledPartyNumber, Date by duration&lt;/P&gt;

&lt;P&gt;But I got results with awkward numbers as "FinalCalledPartyNumber" as per below:&lt;BR /&gt;
708907951  12:44:55 31-10-2017  &lt;STRONG&gt;==&amp;gt; This number 708907951 is no where in my request&lt;/STRONG&gt;&lt;BR /&gt;
708960067  14:18:13 31-10-2017  &lt;STRONG&gt;==&amp;gt; This number 708960067  is no where in my request&lt;/STRONG&gt;&lt;BR /&gt;
966131  11:21:54 31-10-2017   &lt;STRONG&gt;==&amp;gt; This number 966131  is no where in my request&lt;/STRONG&gt;&lt;BR /&gt;
910723  13:10:30 31-10-2017  &lt;STRONG&gt;==&amp;gt; This number 910723  is no where in my request&lt;/STRONG&gt;&lt;BR /&gt;
 331490  09:18:49 31-10-2017 ==&amp;gt; This number 331490  is OK&lt;BR /&gt;
708916453  13:37:38 31-10-2017 &lt;STRONG&gt;==&amp;gt; This number 708916453  is no where in my request&lt;/STRONG&gt;&lt;BR /&gt;
331138  08:34:07 31-10-2017  ==&amp;gt; This number 331138  is OK&lt;BR /&gt;
 333500  08:48:14 31-10-2017   ==&amp;gt; This number 333500  is OK&lt;/P&gt;

&lt;P&gt;Any ideas how to achieve this, to make sure I only got events only for what I requested ?&lt;/P&gt;

&lt;P&gt;Many thanks&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2017 09:24:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/OR-not-working-properly/m-p/339349#M165483</guid>
      <dc:creator>lcharpentier</dc:creator>
      <dc:date>2017-10-31T09:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: OR not working properly</title>
      <link>https://community.splunk.com/t5/Splunk-Search/OR-not-working-properly/m-p/339350#M165484</link>
      <description>&lt;P&gt;Usually you would use a search like &lt;CODE&gt;key=value OR key=value ....&lt;/CODE&gt; but not something you use. In the most recent versions of Splunk you can use an &lt;CODE&gt;eval&lt;/CODE&gt; option called &lt;CODE&gt;in()&lt;/CODE&gt; which does what you want, check the docs &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/ConditionalFunctions#in.28VALUE-LIST.29"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/ConditionalFunctions#in.28VALUE-LIST.29&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2017 09:38:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/OR-not-working-properly/m-p/339350#M165484</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2017-10-31T09:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: OR not working properly</title>
      <link>https://community.splunk.com/t5/Splunk-Search/OR-not-working-properly/m-p/339351#M165485</link>
      <description>&lt;P&gt;@lcharpentier, if you are on &lt;CODE&gt;Splunk Enterprise 6.6&lt;/CODE&gt; or higher you can try search with &lt;CODE&gt;IN&lt;/CODE&gt;clause&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;YourBaseSearch&amp;gt; finalCalledPartyNumber IN (331420, 331088, 331951, 331954, 331138, 331443, 333500, 331490, 332690, 332844, 332846, 332886, 331126, 332510, 333469, 332519, 331200, 331116, 332533, 331028, 333292, 331027)
| &amp;lt;YourRemainingSearch&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you are on previous version you should use &lt;CODE&gt;&amp;lt;fieldName&amp;gt;=value1 OR &amp;lt;fieldName&amp;gt;=value1 OR ...&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;YourBaseSearch&amp;gt; finalCalledPartyNumber=331420 OR finalCalledPartyNumber=331088 OR finalCalledPartyNumber=331951 OR finalCalledPartyNumber=331954 OR finalCalledPartyNumber=331138 OR finalCalledPartyNumber=331443 OR finalCalledPartyNumber=333500 OR finalCalledPartyNumber=331490 OR finalCalledPartyNumber=332690 OR finalCalledPartyNumber=332844 OR finalCalledPartyNumber=332846 OR finalCalledPartyNumber=332886 OR finalCalledPartyNumber=331126 OR finalCalledPartyNumber=332510 OR finalCalledPartyNumber=333469 OR finalCalledPartyNumber=332519 OR finalCalledPartyNumber=331200 OR finalCalledPartyNumber=331116 OR finalCalledPartyNumber=332533 OR finalCalledPartyNumber=331028 OR finalCalledPartyNumber=333292 OR finalCalledPartyNumber=331027
| &amp;lt;YourRemainingSearch&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Just placing &lt;CODE&gt;OR &amp;lt;number&amp;gt;&lt;/CODE&gt; searches for the number across your raw event not just for the value of &lt;CODE&gt;field finalCalledPartyNumber&lt;/CODE&gt;. I am expecting your logs have EPOCH time or some part of your _raw content is matching your search term. You can see in event mode or use highlight command to verify as to why those events are getting selected.&lt;BR /&gt;
You can also consider using wildcard for field value if possible like &lt;CODE&gt;finalCalledPartyNumber="33*"&lt;/CODE&gt; (if applicable).&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2017 09:42:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/OR-not-working-properly/m-p/339351#M165485</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-10-31T09:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: OR not working properly</title>
      <link>https://community.splunk.com/t5/Splunk-Search/OR-not-working-properly/m-p/339352#M165486</link>
      <description>&lt;P&gt;@MuS you beat me to it. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2017 09:43:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/OR-not-working-properly/m-p/339352#M165486</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-10-31T09:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: OR not working properly</title>
      <link>https://community.splunk.com/t5/Splunk-Search/OR-not-working-properly/m-p/339353#M165487</link>
      <description>&lt;P&gt;Looks like it does not work on 6.5.2&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2017 18:20:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/OR-not-working-properly/m-p/339353#M165487</guid>
      <dc:creator>wrangler2x</dc:creator>
      <dc:date>2017-10-31T18:20:53Z</dc:date>
    </item>
  </channel>
</rss>

