<?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 Why is one field not been extracted as expected? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-is-one-field-not-been-extracted-as-expected/m-p/598368#M208367</link>
    <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
&lt;P&gt;I have an issue with one field let say &lt;STRONG&gt;foo &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;These are the scenarios:&lt;/P&gt;
&lt;P&gt;1. If I run a search just with the index that contains the logs I can see the field &lt;STRONG&gt;foo&lt;/STRONG&gt; at the fields bar perfectly and also I can see the values.&lt;/P&gt;
&lt;P&gt;2. If I select the field and is added to the search for example &lt;STRONG&gt;index=bar foo="hello"&lt;/STRONG&gt; the results are ZERO even though I select that value from the previous search (where I saw the field and the values at the field bar).&lt;/P&gt;
&lt;P&gt;3. If I add the sourcetype at the search example &lt;STRONG&gt;index=bar sourcetype=net foo="hello" &lt;/STRONG&gt;I can see results but not the expected results, usually I get less than the real number and the number of results are random in the same interval of time.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Configuration:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I am using the automatic key-value field extraction KV_MODE=json to try to extract the fields of a source. The sources is sending the logs in JSON format.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;#props.conf - SH configuration and indexers&lt;/P&gt;
&lt;P&gt;[net]&lt;BR /&gt;CHARSET=UTF-8&lt;BR /&gt;KV_MODE=json&lt;BR /&gt;TRUNCATE = 99999&lt;BR /&gt;LINE_BREAKER=([\r\n]+)&lt;BR /&gt;NO_BINARY_CHECK=true&lt;BR /&gt;SHOULD_LINEMERGE=true&lt;/P&gt;
&lt;P&gt;#inputs.conf - forwarder&lt;/P&gt;
&lt;P&gt;[monitor:///pat/*.json]&lt;BR /&gt;sourcetype= net&lt;BR /&gt;index = bar&lt;BR /&gt;disabled = false&lt;BR /&gt;crcSalt = &amp;lt;SOURCE&amp;gt;&lt;BR /&gt;ignoreOlderThan = 1d&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Version 8.2.2&lt;/P&gt;
&lt;P&gt;Cluster enviroment.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Notes:&lt;/P&gt;
&lt;P&gt;Also I tried with another sourcetype and data not using the KV_MODE instead I used the EXTRACT-foo and I had the same results, the field doesn't show results when is added to the search.&lt;/P&gt;
&lt;P&gt;The rest all the fields are not having this issue, they work perfectly.&lt;/P&gt;
&lt;P&gt;Thank you for the help.&lt;/P&gt;</description>
    <pubDate>Wed, 18 May 2022 23:05:25 GMT</pubDate>
    <dc:creator>glpadilla_sol</dc:creator>
    <dc:date>2022-05-18T23:05:25Z</dc:date>
    <item>
      <title>Why is one field not been extracted as expected?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-one-field-not-been-extracted-as-expected/m-p/598368#M208367</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
&lt;P&gt;I have an issue with one field let say &lt;STRONG&gt;foo &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;These are the scenarios:&lt;/P&gt;
&lt;P&gt;1. If I run a search just with the index that contains the logs I can see the field &lt;STRONG&gt;foo&lt;/STRONG&gt; at the fields bar perfectly and also I can see the values.&lt;/P&gt;
&lt;P&gt;2. If I select the field and is added to the search for example &lt;STRONG&gt;index=bar foo="hello"&lt;/STRONG&gt; the results are ZERO even though I select that value from the previous search (where I saw the field and the values at the field bar).&lt;/P&gt;
&lt;P&gt;3. If I add the sourcetype at the search example &lt;STRONG&gt;index=bar sourcetype=net foo="hello" &lt;/STRONG&gt;I can see results but not the expected results, usually I get less than the real number and the number of results are random in the same interval of time.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Configuration:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I am using the automatic key-value field extraction KV_MODE=json to try to extract the fields of a source. The sources is sending the logs in JSON format.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;#props.conf - SH configuration and indexers&lt;/P&gt;
&lt;P&gt;[net]&lt;BR /&gt;CHARSET=UTF-8&lt;BR /&gt;KV_MODE=json&lt;BR /&gt;TRUNCATE = 99999&lt;BR /&gt;LINE_BREAKER=([\r\n]+)&lt;BR /&gt;NO_BINARY_CHECK=true&lt;BR /&gt;SHOULD_LINEMERGE=true&lt;/P&gt;
&lt;P&gt;#inputs.conf - forwarder&lt;/P&gt;
&lt;P&gt;[monitor:///pat/*.json]&lt;BR /&gt;sourcetype= net&lt;BR /&gt;index = bar&lt;BR /&gt;disabled = false&lt;BR /&gt;crcSalt = &amp;lt;SOURCE&amp;gt;&lt;BR /&gt;ignoreOlderThan = 1d&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Version 8.2.2&lt;/P&gt;
&lt;P&gt;Cluster enviroment.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Notes:&lt;/P&gt;
&lt;P&gt;Also I tried with another sourcetype and data not using the KV_MODE instead I used the EXTRACT-foo and I had the same results, the field doesn't show results when is added to the search.&lt;/P&gt;
&lt;P&gt;The rest all the fields are not having this issue, they work perfectly.&lt;/P&gt;
&lt;P&gt;Thank you for the help.&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2022 23:05:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-one-field-not-been-extracted-as-expected/m-p/598368#M208367</guid>
      <dc:creator>glpadilla_sol</dc:creator>
      <dc:date>2022-05-18T23:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: Why is one field not been extracted as expected?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-one-field-not-been-extracted-as-expected/m-p/598418#M208379</link>
      <description>Can you post a sample from your json file? Preferably from source as raw events inside &amp;lt;&amp;gt; -block.</description>
      <pubDate>Thu, 19 May 2022 06:06:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-one-field-not-been-extracted-as-expected/m-p/598418#M208379</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2022-05-19T06:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: Why is one field not been extracted as expected?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-one-field-not-been-extracted-as-expected/m-p/598423#M208383</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/241395"&gt;@glpadilla_sol&lt;/a&gt;&amp;nbsp;- Try searching like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=bar foo="*hello*" | where foo="hello"&lt;/LI-CODE&gt;&lt;P&gt;(added wildcard(*) in the search command.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 06:26:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-one-field-not-been-extracted-as-expected/m-p/598423#M208383</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2022-05-19T06:26:28Z</dc:date>
    </item>
    <item>
      <title>Re: Why is one field not been extracted as expected?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-one-field-not-been-extracted-as-expected/m-p/598539#M208420</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/93915"&gt;@VatsalJagani&lt;/a&gt;&amp;nbsp;thank you for the answer, but the issue is not the search. I mean no matter if I use * or not we are not getting results.&lt;/P&gt;&lt;P&gt;The issue is that I can see the field and the values at the field bar, but no when I add it at the search.&lt;/P&gt;&lt;P&gt;Kind Regards.&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 17:30:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-one-field-not-been-extracted-as-expected/m-p/598539#M208420</guid>
      <dc:creator>glpadilla_sol</dc:creator>
      <dc:date>2022-05-19T17:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: Why is one field not been extracted as expected?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-one-field-not-been-extracted-as-expected/m-p/598550#M208423</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/241395"&gt;@glpadilla_sol&lt;/a&gt;&amp;nbsp;- It's not because of the search you need to add *.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But there is some concept about minor and major segmentation that sometimes will not allow you to get results even when you search the extracted value.&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 18:26:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-one-field-not-been-extracted-as-expected/m-p/598550#M208423</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2022-05-19T18:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: Why is one field not been extracted as expected?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-one-field-not-been-extracted-as-expected/m-p/598556#M208425</link>
      <description>&lt;P&gt;Thank you again.&lt;/P&gt;&lt;P&gt;I tried with that search and no results, if I add the sourcetype,&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=bar sourcetype="test" foo="*hello*" | where foo="hello"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can see results but not all the results, it's a partial view, that also happens when I run this&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=bar sourcetype ="test" foo="hello" &lt;/LI-CODE&gt;&lt;P&gt;Both scenarios I got the same results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also I notice at the search.log that the search is running against some extractions that are not part of that sourcetype. I mean we have the same field been extracted into another sourcetype, but at indexing time using props.conf and transforms.conf.&lt;/P&gt;&lt;P&gt;Can this for some reason be related?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Event though are different sourcetypes?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your inputs.&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 19:26:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-one-field-not-been-extracted-as-expected/m-p/598556#M208425</guid>
      <dc:creator>glpadilla_sol</dc:creator>
      <dc:date>2022-05-19T19:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: Why is one field not been extracted as expected?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-one-field-not-been-extracted-as-expected/m-p/598559#M208427</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Unluckily I cannot share that content because is confidential.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But is a normal JSON like this&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;{"&lt;/SPAN&gt;&lt;SPAN class=""&gt;backendhost&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt;&lt;SPAN&gt; "&lt;/SPAN&gt;&lt;SPAN class=""&gt;2.11.27.94&lt;/SPAN&gt;&lt;SPAN&gt;", "&lt;/SPAN&gt;&lt;SPAN class=""&gt;backendport&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;1001&lt;/SPAN&gt;&lt;SPAN&gt;, "&lt;/SPAN&gt;&lt;SPAN class=""&gt;console_device&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt;&lt;SPAN&gt; "&lt;/SPAN&gt;&lt;SPAN class=""&gt;unknown&lt;/SPAN&gt;&lt;SPAN&gt;", "&lt;/SPAN&gt;&lt;SPAN class=""&gt;console_name&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt;&lt;SPAN&gt; "sdj934&lt;/SPAN&gt;&lt;SPAN&gt;", "&lt;/SPAN&gt;&lt;SPAN class=""&gt;domain&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt;&lt;SPAN&gt; "domainname&lt;/SPAN&gt;&lt;SPAN&gt;", "&lt;/SPAN&gt;&lt;SPAN class=""&gt;frontendport&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt;&amp;nbsp;8347&lt;SPAN&gt;, "&lt;/SPAN&gt;&lt;SPAN class=""&gt;frontendprotocol&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt;&lt;SPAN&gt; "tcp&lt;/SPAN&gt;&lt;SPAN&gt;"}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 19:30:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-one-field-not-been-extracted-as-expected/m-p/598559#M208427</guid>
      <dc:creator>glpadilla_sol</dc:creator>
      <dc:date>2022-05-19T19:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: Why is one field not been extracted as expected?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-one-field-not-been-extracted-as-expected/m-p/598568#M208429</link>
      <description>&lt;P&gt;Maybe this explains it&amp;nbsp;&lt;A href="https://community.splunk.com/t5/Splunk-Search/Why-is-it-when-you-don-t-put-a-wild-card-when-searching-after/m-p/585674#M204058" target="_blank"&gt;https://community.splunk.com/t5/Splunk-Search/Why-is-it-when-you-don-t-put-a-wild-card-when-searching-after/m-p/585674#M204058&lt;/A&gt;&amp;nbsp;?&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 20:13:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-one-field-not-been-extracted-as-expected/m-p/598568#M208429</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2022-05-19T20:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Why is one field not been extracted as expected?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-one-field-not-been-extracted-as-expected/m-p/598675#M208460</link>
      <description>&lt;P&gt;It kind of looks like you might have created an indexed field extraction using EXTRACT-foo. If that is the case, try the following search:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=bar foo::"*hello*"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 14:59:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-one-field-not-been-extracted-as-expected/m-p/598675#M208460</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2022-05-20T14:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: Why is one field not been extracted as expected?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-one-field-not-been-extracted-as-expected/m-p/603453#M210002</link>
      <description>&lt;P&gt;I found the root cause, updating in case someone else is facing the same issue:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.splunk.com/en_us/blog/tips-and-tricks/cannot-search-based-on-an-extracted-field.html?_gl=1*at4wpd*_ga*MjE0MDA2MDA2MS4xNjI4ODcyNDg2*_gid*MTAwMjUwNDQwMy4xNjUzNDE3ODYy&amp;amp;_ga=2.247787271.1002504403.1653417862-2140060061.1628872486&amp;amp;locale=en_us" target="_blank"&gt;https://www.splunk.com/en_us/blog/tips-and-tricks/cannot-search-based-on-an-extracted-field.html?_gl=1*at4wpd*_ga*MjE0MDA2MDA2MS4xNjI4ODcyNDg2*_gid*MTAwMjUwNDQwMy4xNjUzNDE3ODYy&amp;amp;_ga=2.247787271.1002504403.1653417862-2140060061.1628872486&amp;amp;locale=en_us&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The solution&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;$SPLUNK_HOME/etc/system/local/fields.conf
[MyField]
INDEXED_VALUE = false&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jun 2022 20:59:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-one-field-not-been-extracted-as-expected/m-p/603453#M210002</guid>
      <dc:creator>glpadilla_sol</dc:creator>
      <dc:date>2022-06-27T20:59:49Z</dc:date>
    </item>
  </channel>
</rss>

