<?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: Multiple sourcetypes in a search? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-sourcetypes-in-a-search/m-p/95621#M19924</link>
    <description>&lt;P&gt;That's pretty much what I figured. Thank you!&lt;/P&gt;</description>
    <pubDate>Sat, 17 Mar 2012 18:24:54 GMT</pubDate>
    <dc:creator>PHRaymond</dc:creator>
    <dc:date>2012-03-17T18:24:54Z</dc:date>
    <item>
      <title>Multiple sourcetypes in a search?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-sourcetypes-in-a-search/m-p/95619#M19922</link>
      <description>&lt;P&gt;Just curious, can this search parameter be streamlined at all?&lt;/P&gt;

&lt;P&gt;sourcetype=typeone OR sourcetype=typetwo OR sourcetype=typethree OR sourcetype=typefour&lt;/P&gt;

&lt;P&gt;I'm just looking for something more elegant, so this isn't critical by any means. I was hoping for something like:&lt;/P&gt;

&lt;P&gt;sourcetype=(typeone,typetwo,typethree,typefour)&lt;/P&gt;

&lt;P&gt;but no love. Any thoughts?&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Mar 2012 17:17:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Multiple-sourcetypes-in-a-search/m-p/95619#M19922</guid>
      <dc:creator>PHRaymond</dc:creator>
      <dc:date>2012-03-17T17:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple sourcetypes in a search?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-sourcetypes-in-a-search/m-p/95620#M19923</link>
      <description>&lt;P&gt;There isn't anything directly like that in the search language.  For a small set of sourcetypes (or any other field), an OR between each is the best approach.  You can encapsulate this inside of a macro to make for less typing.&lt;/P&gt;

&lt;P&gt;For a larger set (large enough to be willing to maintain a lookup table), you can emulate this using &lt;CODE&gt;inputlookup&lt;/CODE&gt; and a subsearch.  For example, define a lookup table in &lt;CODE&gt;$SPLUNK_HOME/etc/system/lookups&lt;/CODE&gt; called many_sourcetypes.csv as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype
typeone
typetwo
typethree
.
.
.
typefiftyseven
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then, in your search --&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[ | inputlookup many_sourcetypes.csv | fields sourcetype ] ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 17 Mar 2012 18:23:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Multiple-sourcetypes-in-a-search/m-p/95620#M19923</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2012-03-17T18:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple sourcetypes in a search?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-sourcetypes-in-a-search/m-p/95621#M19924</link>
      <description>&lt;P&gt;That's pretty much what I figured. Thank you!&lt;/P&gt;</description>
      <pubDate>Sat, 17 Mar 2012 18:24:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Multiple-sourcetypes-in-a-search/m-p/95621#M19924</guid>
      <dc:creator>PHRaymond</dc:creator>
      <dc:date>2012-03-17T18:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple sourcetypes in a search?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Multiple-sourcetypes-in-a-search/m-p/95622#M19925</link>
      <description>&lt;P&gt;You can also use tags on the sourcetypes.  &lt;/P&gt;

&lt;P&gt;tag=yourtagname  yousearchhere&lt;/P&gt;

&lt;P&gt;and it will search all the sourcetypes with that tag name. &lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2014 13:30:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Multiple-sourcetypes-in-a-search/m-p/95622#M19925</guid>
      <dc:creator>mux</dc:creator>
      <dc:date>2014-01-30T13:30:19Z</dc:date>
    </item>
  </channel>
</rss>

