<?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: How to do multiple searches at once? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-multiple-searches-at-once/m-p/119957#M32207</link>
    <description>&lt;P&gt;ahh, just add those cases in the case statement like so&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="socialist action" "government" OR "govern" OR "race" OR "racist" | eval word = case(word=="racist","race", word =="govern", "government", word =="government", "government", word=="race", "race") | stats count by word
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 14 Jul 2015 19:02:14 GMT</pubDate>
    <dc:creator>sk314</dc:creator>
    <dc:date>2015-07-14T19:02:14Z</dc:date>
    <item>
      <title>How to do multiple searches at once?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-multiple-searches-at-once/m-p/119949#M32199</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;

&lt;P&gt;I need to have multiple searches running that pull up a word from the same field and replace it with another (doing this:** | eval word = if (word="racist","race",word) | stats count by word** ). My problem is I want to do this multiple times with different words but when I tried append, appendcols, join, or saving the searches, they never work out quite right. The closest I have gotten is this in my search bar:&lt;BR /&gt;
 &lt;STRONG&gt;sourcetype="socialist action" "government" OR "govern" | eval word = if (word="govern","government",word) | stats count by word | appendcols[search sourcetype="socialist action" "government" OR "govern" OR "race" OR "racist" | eval word = if (word="racist","race",word) | stats count by word]&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;But it still leaves another government:&lt;BR /&gt;
word                                                              count&lt;BR /&gt;
government                                  1094&lt;BR /&gt;
&lt;STRONG&gt;government                                    16&lt;/STRONG&gt;&lt;BR /&gt;
race                                            405 &lt;/P&gt;

&lt;P&gt;Do any of you have a suggestion on how to fix this? Please let me know!&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2015 18:26:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-multiple-searches-at-once/m-p/119949#M32199</guid>
      <dc:creator>BITSIntern</dc:creator>
      <dc:date>2015-07-14T18:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to do multiple searches at once?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-multiple-searches-at-once/m-p/119950#M32200</link>
      <description>&lt;P&gt;You should do this with a &lt;CODE&gt;lookup&lt;/CODE&gt; table that looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;synonym,word
race,racist
racist,racist
govern,government
government,government
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then you call it anywhere at any time like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | lookup mylookuptablename synonym AS word OUTPUTNEW word AS word | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Jul 2015 18:40:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-multiple-searches-at-once/m-p/119950#M32200</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-14T18:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to do multiple searches at once?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-multiple-searches-at-once/m-p/119951#M32201</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="socialist action" "government" OR "govern" OR "race" OR "racist" | eval word = case(word=="racist","race", word =="govern", "government") | stats count by word
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;EDIT: assuming you have a field named "word" already extracted/populated&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2015 18:44:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-multiple-searches-at-once/m-p/119951#M32201</guid>
      <dc:creator>sk314</dc:creator>
      <dc:date>2015-07-14T18:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to do multiple searches at once?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-multiple-searches-at-once/m-p/119952#M32202</link>
      <description>&lt;P&gt;wait where do I put the lookup table? Do I create a transforms.conf file and upload it to splunk?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2015 18:46:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-multiple-searches-at-once/m-p/119952#M32202</guid>
      <dc:creator>BITSIntern</dc:creator>
      <dc:date>2015-07-14T18:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to do multiple searches at once?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-multiple-searches-at-once/m-p/119953#M32203</link>
      <description>&lt;P&gt;hmm its weird, it worked but it forgot a few of the events...&lt;BR /&gt;
so it gave me 1078 for government instead of 1094 and 314 for race instead of 405&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2015 18:50:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-multiple-searches-at-once/m-p/119953#M32203</guid>
      <dc:creator>BITSIntern</dc:creator>
      <dc:date>2015-07-14T18:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to do multiple searches at once?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-multiple-searches-at-once/m-p/119954#M32204</link>
      <description>&lt;P&gt;how did you validate those numbers?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2015 18:52:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-multiple-searches-at-once/m-p/119954#M32204</guid>
      <dc:creator>sk314</dc:creator>
      <dc:date>2015-07-14T18:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to do multiple searches at once?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-multiple-searches-at-once/m-p/119955#M32205</link>
      <description>&lt;P&gt;well I know that the count of the word govern plus the count of the word government equals 1094 (1078 + 16 = 1094) and the count of the word racist plus the count of the word race equals 405 (314 + 91 = 405)... I guess it just is not adding the actual word's count to the renamed word&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2015 18:56:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-multiple-searches-at-once/m-p/119955#M32205</guid>
      <dc:creator>BITSIntern</dc:creator>
      <dc:date>2015-07-14T18:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to do multiple searches at once?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-multiple-searches-at-once/m-p/119956#M32206</link>
      <description>&lt;P&gt;the count of govern is 1078 and government is 16 so it should be 1094 together and the count of racist is 314 and race is 91 so it should be 405 together... I guess it did not include the amount of the originial word in the count&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2015 18:59:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-multiple-searches-at-once/m-p/119956#M32206</guid>
      <dc:creator>BITSIntern</dc:creator>
      <dc:date>2015-07-14T18:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to do multiple searches at once?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-multiple-searches-at-once/m-p/119957#M32207</link>
      <description>&lt;P&gt;ahh, just add those cases in the case statement like so&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="socialist action" "government" OR "govern" OR "race" OR "racist" | eval word = case(word=="racist","race", word =="govern", "government", word =="government", "government", word=="race", "race") | stats count by word
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Jul 2015 19:02:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-multiple-searches-at-once/m-p/119957#M32207</guid>
      <dc:creator>sk314</dc:creator>
      <dc:date>2015-07-14T19:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to do multiple searches at once?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-multiple-searches-at-once/m-p/119958#M32208</link>
      <description>&lt;P&gt;THANK YOU!&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2015 19:05:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-multiple-searches-at-once/m-p/119958#M32208</guid>
      <dc:creator>BITSIntern</dc:creator>
      <dc:date>2015-07-14T19:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to do multiple searches at once?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-multiple-searches-at-once/m-p/119959#M32209</link>
      <description>&lt;P&gt;Do you like working from the GUI or CLI?  It is pretty easy, just create the file on your desktop and upload it from &lt;CODE&gt;Settings&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;Lookups&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;Lookup table files&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;New&lt;/CODE&gt;.  Then create a reference to it from &lt;CODE&gt;Settings&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;Lookups&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;Lookup definitions&lt;/CODE&gt; -&amp;gt; &lt;CODE&gt;New&lt;/CODE&gt;.  Probably you should expand the permissions on both.  Then you can use it just like my answer shows.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2015 05:34:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-multiple-searches-at-once/m-p/119959#M32209</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-17T05:34:45Z</dc:date>
    </item>
  </channel>
</rss>

