<?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 specify field type value in search query? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-specify-field-type-value-in-search-query/m-p/472001#M81124</link>
    <description>&lt;P&gt;Hi lsy9891,&lt;BR /&gt;
let me understand: &lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;you have a source like "Monster.Ebiz.Order20.Services",&lt;/LI&gt;
&lt;LI&gt;you want to search by a part of this field "Ebiz.Order20",&lt;/LI&gt;
&lt;LI&gt;what do you mean with: "So why can't I specify it directly?"&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;if you have something before and after "Ebiz.Order20", you can use jolly chars at the beginning and the end of the search string&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=my_index source="*Ebiz.Order20*"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But this search isn't so performant, so the second solution I suggested should be better.&lt;BR /&gt;
You can also call the new field Application and maintain both the fields:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=my_index
| rex field=source ".*\/(?&amp;lt;Application&amp;gt;.*)"
| search Application="Ebiz.Order20"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But anyway, the regex you used was wrong.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
    <pubDate>Fri, 06 Sep 2019 06:59:45 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2019-09-06T06:59:45Z</dc:date>
    <item>
      <title>How to specify field type value in search query?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-specify-field-type-value-in-search-query/m-p/471996#M81119</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a field type "Source" and I want to filter the events by source="Ebiz.Order20" etc. . I tried  &lt;STRONG&gt;AND  source="Ebiz.Order20"&lt;/STRONG&gt;  which returned no results even though there are events where the field has that value.  I also tried extracting the field using this &lt;CODE&gt;source"(?&amp;lt;Application&amp;gt;)"&lt;/CODE&gt; but it returned nothing?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 07:44:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-specify-field-type-value-in-search-query/m-p/471996#M81119</guid>
      <dc:creator>lsy9891</dc:creator>
      <dc:date>2019-09-05T07:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to specify field type value in search query?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-specify-field-type-value-in-search-query/m-p/471997#M81120</link>
      <description>&lt;P&gt;Hi lsy9891,&lt;BR /&gt;
if your field source has values like "blah/blah/Ebiz.Order20" you can use jollyh chars in your search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=my_index source="*Ebiz.Order20"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or you can extract a new field using rex command and use it for searches:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=my_index
| rex field=source ".*\/(?&amp;lt;my_source&amp;gt;.*)"
| search my_source="Ebiz.Order20"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 08:05:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-specify-field-type-value-in-search-query/m-p/471997#M81120</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-09-05T08:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to specify field type value in search query?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-specify-field-type-value-in-search-query/m-p/471998#M81121</link>
      <description>&lt;P&gt;Every Splunk event has a field called "source" (and "sourcetype, _time, host, etc.)  Is this the Splunk generated source value whichis typically a file path like /foldera/folderb/filename.ext ans as @gcusello says you would search with source="*filename.ext"&lt;/P&gt;

&lt;P&gt;If you are extracxting your own "source" I would definitely use some other field name to avoid conflicts with the Splunk fields.&lt;/P&gt;

&lt;P&gt;I am not sure what you have before AND source= but a typical search would be something like:&lt;/P&gt;

&lt;P&gt;index=my_index source="*filename.ext"&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 23:35:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-specify-field-type-value-in-search-query/m-p/471998#M81121</guid>
      <dc:creator>hunderliggur</dc:creator>
      <dc:date>2019-09-05T23:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to specify field type value in search query?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-specify-field-type-value-in-search-query/m-p/471999#M81122</link>
      <description>&lt;P&gt;My source field looks like this: &lt;/P&gt;

&lt;P&gt;Source: Monster.Ebiz.Order20.Services? So why can't I specify it directly?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2019 02:42:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-specify-field-type-value-in-search-query/m-p/471999#M81122</guid>
      <dc:creator>lsy9891</dc:creator>
      <dc:date>2019-09-06T02:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to specify field type value in search query?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-specify-field-type-value-in-search-query/m-p/472000#M81123</link>
      <description>&lt;P&gt;@lsy9891 Monster.Ebiz.Order20.Services is not the same as Ebiz.Order20&lt;/P&gt;

&lt;P&gt;You would need to match on “&lt;EM&gt;Ebiz.Order20&lt;/EM&gt;” , very much like @gcusello originally suggested not knowing there were training characters in the field also.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2019 03:15:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-specify-field-type-value-in-search-query/m-p/472000#M81123</guid>
      <dc:creator>hunderliggur</dc:creator>
      <dc:date>2019-09-06T03:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to specify field type value in search query?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-specify-field-type-value-in-search-query/m-p/472001#M81124</link>
      <description>&lt;P&gt;Hi lsy9891,&lt;BR /&gt;
let me understand: &lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;you have a source like "Monster.Ebiz.Order20.Services",&lt;/LI&gt;
&lt;LI&gt;you want to search by a part of this field "Ebiz.Order20",&lt;/LI&gt;
&lt;LI&gt;what do you mean with: "So why can't I specify it directly?"&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;if you have something before and after "Ebiz.Order20", you can use jolly chars at the beginning and the end of the search string&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=my_index source="*Ebiz.Order20*"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But this search isn't so performant, so the second solution I suggested should be better.&lt;BR /&gt;
You can also call the new field Application and maintain both the fields:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=my_index
| rex field=source ".*\/(?&amp;lt;Application&amp;gt;.*)"
| search Application="Ebiz.Order20"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But anyway, the regex you used was wrong.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2019 06:59:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-specify-field-type-value-in-search-query/m-p/472001#M81124</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-09-06T06:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to specify field type value in search query?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-specify-field-type-value-in-search-query/m-p/472002#M81125</link>
      <description>&lt;P&gt;You say the field is called capital-S &lt;CODE&gt;Source&lt;/CODE&gt; but then you are using lowercase-s &lt;CODE&gt;source&lt;/CODE&gt; in your SPL.  Field &lt;EM&gt;names&lt;/EM&gt; are case-sensitive.  You must match them.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Sep 2019 20:54:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-specify-field-type-value-in-search-query/m-p/472002#M81125</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-09-08T20:54:14Z</dc:date>
    </item>
  </channel>
</rss>

