<?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: Query with Thousands of &amp;quot;OR&amp;quot;s in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Query-with-Thousands-of-quot-OR-quot-s/m-p/180138#M51873</link>
    <description>&lt;P&gt;This method doesn't seem to work.  First, it won't let me put anything before the |inputlookup.  Second, if I run the lookup on its own, it gives me a list of the URLs.  If I follow the lookup and file with the rest of my search it comes up with no results because it is not searching the index for the lookup file and then formatting a table from there.&lt;/P&gt;

&lt;P&gt;Any thoughts?&lt;/P&gt;</description>
    <pubDate>Mon, 16 Dec 2013 20:49:47 GMT</pubDate>
    <dc:creator>ccsfdave</dc:creator>
    <dc:date>2013-12-16T20:49:47Z</dc:date>
    <item>
      <title>Query with Thousands of "OR"s</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-with-Thousands-of-quot-OR-quot-s/m-p/180134#M51869</link>
      <description>&lt;P&gt;Greetings,&lt;/P&gt;

&lt;P&gt;I want to know the least resource intensive way of searching thousands of URLs in one search.  So what I am doing is taking the Infragard warnings and then building them into queries enterprise-wide.  The latest warning had about 2500 URLs that have been used for DDoS and Botnets.  Right now I have a scheduled search with URL OR URL OR URL....etc.&lt;/P&gt;

&lt;P&gt;Is there a better way to do this?  When I want to adjust the search, I have to pull it into a text editor and then put it back because Splunk web will crawl while I mess with it.&lt;/P&gt;

&lt;P&gt;Thanks and let me know if I need to be more specific.&lt;/P&gt;

&lt;P&gt;Dave&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2013 17:55:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-with-Thousands-of-quot-OR-quot-s/m-p/180134#M51869</guid>
      <dc:creator>ccsfdave</dc:creator>
      <dc:date>2013-12-16T17:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: Query with Thousands of "OR"s</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-with-Thousands-of-quot-OR-quot-s/m-p/180135#M51870</link>
      <description>&lt;P&gt;Is there some other common field you could use in your search?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2013 18:36:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-with-Thousands-of-quot-OR-quot-s/m-p/180135#M51870</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2013-12-16T18:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: Query with Thousands of "OR"s</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-with-Thousands-of-quot-OR-quot-s/m-p/180136#M51871</link>
      <description>&lt;P&gt;If the list of URL are static, then you can create a lookup table with them.[create a csv file with all URL entry,one per row. Manager-&amp;gt;Lookups-&amp;gt;lookup table files]. The you can use this lookup file in  your search query to filter out events.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your search | inputlookup lookup_urls.csv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;H2&gt;Updated search&lt;/H2&gt;

&lt;P&gt;Try this.,Assuming your lookup table have just one field named URL&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearch [|inputlookup lookup_urls.csv | rename URL as search | fields search]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This search will put all the URLs from the lookup table as values and append it to your base search. E.g. if you have URL values like  "abc.com", "xyz.com", "pqr.com" in the lookup file, it will become &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your search  (("abc.com") OR ("xyz.com") OR ("pqr.com"))
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Dec 2013 18:46:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-with-Thousands-of-quot-OR-quot-s/m-p/180136#M51871</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2013-12-16T18:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: Query with Thousands of "OR"s</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-with-Thousands-of-quot-OR-quot-s/m-p/180137#M51872</link>
      <description>&lt;P&gt;Hmm, let me give that a try.  I'll report back on how it performs.  Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2013 19:49:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-with-Thousands-of-quot-OR-quot-s/m-p/180137#M51872</guid>
      <dc:creator>ccsfdave</dc:creator>
      <dc:date>2013-12-16T19:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: Query with Thousands of "OR"s</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-with-Thousands-of-quot-OR-quot-s/m-p/180138#M51873</link>
      <description>&lt;P&gt;This method doesn't seem to work.  First, it won't let me put anything before the |inputlookup.  Second, if I run the lookup on its own, it gives me a list of the URLs.  If I follow the lookup and file with the rest of my search it comes up with no results because it is not searching the index for the lookup file and then formatting a table from there.&lt;/P&gt;

&lt;P&gt;Any thoughts?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2013 20:49:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-with-Thousands-of-quot-OR-quot-s/m-p/180138#M51873</guid>
      <dc:creator>ccsfdave</dc:creator>
      <dc:date>2013-12-16T20:49:47Z</dc:date>
    </item>
    <item>
      <title>Re: Query with Thousands of "OR"s</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-with-Thousands-of-quot-OR-quot-s/m-p/180139#M51874</link>
      <description>&lt;P&gt;Try the updated answer.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2013 21:10:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-with-Thousands-of-quot-OR-quot-s/m-p/180139#M51874</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2013-12-16T21:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: Query with Thousands of "OR"s</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-with-Thousands-of-quot-OR-quot-s/m-p/180140#M51875</link>
      <description>&lt;P&gt;My original search was:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://abc.com"&gt;http://abc.com&lt;/A&gt; OR &lt;A href="http://def.com"&gt;http://def.com&lt;/A&gt; OR ... |search Department="*"| rename src_ip as "IP" |table Department, IP | dedup IP&lt;/P&gt;

&lt;P&gt;I am trying to format the revised answer above into it but am having no luck.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2013 21:37:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-with-Thousands-of-quot-OR-quot-s/m-p/180140#M51875</guid>
      <dc:creator>ccsfdave</dc:creator>
      <dc:date>2013-12-16T21:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: Query with Thousands of "OR"s</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-with-Thousands-of-quot-OR-quot-s/m-p/180141#M51876</link>
      <description>&lt;P&gt;Try this&lt;BR /&gt;
Department=\"*\" [|inputlookup lookup_urls.csv | rename URL as search | fields search]| rename src_ip as "IP" |table Department, IP | dedup IP&lt;/P&gt;

&lt;P&gt;Ensure that lookup file name (lookup_urls.csv) and field name (URL) are correct.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:29:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-with-Thousands-of-quot-OR-quot-s/m-p/180141#M51876</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-09-28T15:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: Query with Thousands of "OR"s</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-with-Thousands-of-quot-OR-quot-s/m-p/180142#M51877</link>
      <description>&lt;P&gt;@somesoni2, this worked!  Thanks!!!&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2013 19:16:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-with-Thousands-of-quot-OR-quot-s/m-p/180142#M51877</guid>
      <dc:creator>ccsfdave</dc:creator>
      <dc:date>2013-12-17T19:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: Query with Thousands of "OR"s</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-with-Thousands-of-quot-OR-quot-s/m-p/562161#M195505</link>
      <description>&lt;P&gt;Hi, please help, i have 6500 IIN (like id) and put this id to lookup then tried search: index=alfa [|inputlookup IIN_oleg.csv |rename IIN as search | fields search]&amp;nbsp;&lt;/P&gt;&lt;P&gt;They give result only for one firs IIN in lookup.&lt;/P&gt;&lt;P&gt;If i search whit out lookup just 10 IIN use OR the give me 10 result&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 04:00:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-with-Thousands-of-quot-OR-quot-s/m-p/562161#M195505</guid>
      <dc:creator>Dmitriy</dc:creator>
      <dc:date>2021-08-05T04:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: Query with Thousands of "OR"s</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-with-Thousands-of-quot-OR-quot-s/m-p/562163#M195506</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/233284"&gt;@Dmitriy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=alfa [|inputlookup IIN_oleg.csv | dedup IIN |table IIN | format "(" "(" "AND" ")" "OR" ")"&lt;/LI-CODE&gt;&lt;P&gt;The assumption is IIN field is also in alfa&amp;nbsp;index events.&lt;/P&gt;&lt;P&gt;If you need further help, I will suggest to post new question with your requirement.&lt;/P&gt;&lt;P&gt;KV&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 04:58:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-with-Thousands-of-quot-OR-quot-s/m-p/562163#M195506</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-08-05T04:58:48Z</dc:date>
    </item>
  </channel>
</rss>

