<?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: Why am I not getting results running a search on an extracted field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-not-getting-results-running-a-search-on-an-extracted/m-p/202272#M58662</link>
    <description>&lt;P&gt;Hi Giussepe,&lt;/P&gt;

&lt;P&gt;Your field extraction looks good. When you extract using 21 characters and run the search "index=xxx sourcetype=xxx", do you already have a field called "Myfield" in the interesting fields list? If yes, then it means your extraction is already saved in the props.conf of the search head.&lt;BR /&gt;
If not, then this is a weird case of rex &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Apr 2016 12:19:07 GMT</pubDate>
    <dc:creator>meenal901</dc:creator>
    <dc:date>2016-04-14T12:19:07Z</dc:date>
    <item>
      <title>Why am I not getting results running a search on an extracted field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-not-getting-results-running-a-search-on-an-extracted/m-p/202271#M58661</link>
      <description>&lt;P&gt;Hi at all,&lt;/P&gt;

&lt;P&gt;I have a very strange behavior in one of my searches:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;I extracted a field from a raw as a part of a word: &lt;CODE&gt;2016-04-13 12.12.45 ZZ1234567890123456789&lt;/CODE&gt; and I need to take only the first 8 letters after the date &lt;CODE&gt;ZZ123456&lt;/CODE&gt;;&lt;/LI&gt;
&lt;LI&gt;I use the following regex  &lt;CODE&gt;^.{20}(?\w{8})&lt;/CODE&gt;. It runs and I can extract my field and show it in my tables.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;The problem is when I want to search using my field because if i write:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  index=xxx sourcetype=xxx Myfield="ZZ123456"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I don't get any results.&lt;/P&gt;

&lt;P&gt;If I instead write:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  index=xxx sourcetype=xxx | search Myfield="ZZ123456"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I find the correct log.&lt;/P&gt;

&lt;P&gt;The problem seems to be in the field extraction because if I extract the full string &lt;CODE&gt;^.{20}(?\w{21})&lt;/CODE&gt;, the search runs in both the situations, but if I want to use only a part of it, the search doesn't run.&lt;/P&gt;

&lt;P&gt;Now I'm modifying all my searches, but it's a long job that I'd like to avoid.&lt;/P&gt;

&lt;P&gt;Anyone has an idea of how to intervene?&lt;/P&gt;

&lt;P&gt;Thank you in advance.&lt;/P&gt;

&lt;P&gt;Bye.&lt;/P&gt;

&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2016 08:56:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-not-getting-results-running-a-search-on-an-extracted/m-p/202271#M58661</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2016-04-14T08:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I not getting results running a search on an extracted field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-not-getting-results-running-a-search-on-an-extracted/m-p/202272#M58662</link>
      <description>&lt;P&gt;Hi Giussepe,&lt;/P&gt;

&lt;P&gt;Your field extraction looks good. When you extract using 21 characters and run the search "index=xxx sourcetype=xxx", do you already have a field called "Myfield" in the interesting fields list? If yes, then it means your extraction is already saved in the props.conf of the search head.&lt;BR /&gt;
If not, then this is a weird case of rex &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2016 12:19:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-not-getting-results-running-a-search-on-an-extracted/m-p/202272#M58662</guid>
      <dc:creator>meenal901</dc:creator>
      <dc:date>2016-04-14T12:19:07Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I not getting results running a search on an extracted field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-not-getting-results-running-a-search-on-an-extracted/m-p/202273#M58663</link>
      <description>&lt;P&gt;See this blog post for a good explanation on why this happens.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://blogs.splunk.com/2011/10/07/cannot-search-based-on-an-extracted-field/"&gt;http://blogs.splunk.com/2011/10/07/cannot-search-based-on-an-extracted-field/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2016 14:53:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-not-getting-results-running-a-search-on-an-extracted/m-p/202273#M58663</guid>
      <dc:creator>twinspop</dc:creator>
      <dc:date>2016-04-14T14:53:06Z</dc:date>
    </item>
  </channel>
</rss>

