<?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 does this indexed field search give the wrong results when looking for specific values? in Splunk Enterprise Security</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Why-does-this-indexed-field-search-give-the-wrong-results-when/m-p/431020#M5615</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;We have an heavy forwarder in every location.&lt;BR /&gt;
At the HF have an indexed field (meta) called "site-id" that gets added to each event via props/transforms (Regex = .*)&lt;/P&gt;

&lt;P&gt;If I now do a search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="my_index" site-id="*" (verbose, 24 h)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As a result, I get a count of 122565 events and if I clock on the field "site-id" it shows a distribution of 100% and only 1 value "my_value"&lt;/P&gt;

&lt;P&gt;Now, the strange behavior starts:&lt;/P&gt;

&lt;P&gt;If I click on the field and add it to the search with the one value that exists&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="my_index" site-id="my_value" (verbose, 24 h)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I only get 47 results&lt;/P&gt;

&lt;P&gt;If I do&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="my_index" site-id="my_value*" (verbose, 24 h)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get the 122565 results again&lt;/P&gt;

&lt;P&gt;There are no hidden character or anything at that values I exported it and looked at the character coding only "LF"&lt;/P&gt;

&lt;P&gt;I even tried the following two searches to see if there is any difference:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="my_index" site-id="*"| strcat site-id ":TEST" new_site_id | search new_site_id="my_value:TEST" | stats count by new_site_id
gives me the result result: count 122565
index="my_index" site-id="my_value"| strcat site-id ":TEST" new_site_id | search new_site_id="my_value:TEST" | stats count by 
new_site_id
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;gives me the result: count 47&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search ... | fieldsummary site-id gives a count of 122565 a singe value of my_value and a dc=1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Why can't I search for site-id="my_value" and get the 122565 results?&lt;/P&gt;

&lt;P&gt;Please any ideas?&lt;/P&gt;

&lt;P&gt;Best&lt;BR /&gt;
Michael&lt;/P&gt;</description>
    <pubDate>Fri, 07 Dec 2018 08:44:47 GMT</pubDate>
    <dc:creator>socconsulting</dc:creator>
    <dc:date>2018-12-07T08:44:47Z</dc:date>
    <item>
      <title>Why does this indexed field search give the wrong results when looking for specific values?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Why-does-this-indexed-field-search-give-the-wrong-results-when/m-p/431020#M5615</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;We have an heavy forwarder in every location.&lt;BR /&gt;
At the HF have an indexed field (meta) called "site-id" that gets added to each event via props/transforms (Regex = .*)&lt;/P&gt;

&lt;P&gt;If I now do a search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="my_index" site-id="*" (verbose, 24 h)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As a result, I get a count of 122565 events and if I clock on the field "site-id" it shows a distribution of 100% and only 1 value "my_value"&lt;/P&gt;

&lt;P&gt;Now, the strange behavior starts:&lt;/P&gt;

&lt;P&gt;If I click on the field and add it to the search with the one value that exists&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="my_index" site-id="my_value" (verbose, 24 h)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I only get 47 results&lt;/P&gt;

&lt;P&gt;If I do&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="my_index" site-id="my_value*" (verbose, 24 h)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get the 122565 results again&lt;/P&gt;

&lt;P&gt;There are no hidden character or anything at that values I exported it and looked at the character coding only "LF"&lt;/P&gt;

&lt;P&gt;I even tried the following two searches to see if there is any difference:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="my_index" site-id="*"| strcat site-id ":TEST" new_site_id | search new_site_id="my_value:TEST" | stats count by new_site_id
gives me the result result: count 122565
index="my_index" site-id="my_value"| strcat site-id ":TEST" new_site_id | search new_site_id="my_value:TEST" | stats count by 
new_site_id
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;gives me the result: count 47&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search ... | fieldsummary site-id gives a count of 122565 a singe value of my_value and a dc=1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Why can't I search for site-id="my_value" and get the 122565 results?&lt;/P&gt;

&lt;P&gt;Please any ideas?&lt;/P&gt;

&lt;P&gt;Best&lt;BR /&gt;
Michael&lt;/P&gt;</description>
      <pubDate>Fri, 07 Dec 2018 08:44:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Why-does-this-indexed-field-search-give-the-wrong-results-when/m-p/431020#M5615</guid>
      <dc:creator>socconsulting</dc:creator>
      <dc:date>2018-12-07T08:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this indexed field search give the wrong results when looking for specific values?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Why-does-this-indexed-field-search-give-the-wrong-results-when/m-p/431021#M5616</link>
      <description>&lt;P&gt;When you run this search, did you see any other additional sourcetypes/sources/hosts...??&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="my_index" site-id="my_value*" (verbose, 24 h)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Dec 2018 20:11:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Why-does-this-indexed-field-search-give-the-wrong-results-when/m-p/431021#M5616</guid>
      <dc:creator>prakash007</dc:creator>
      <dc:date>2018-12-07T20:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this indexed field search give the wrong results when looking for specific values?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Why-does-this-indexed-field-search-give-the-wrong-results-when/m-p/431022#M5617</link>
      <description>&lt;P&gt;No just the expected one.&lt;BR /&gt;
We now even tried to change the added metafield from site-id to site_id to see if the "-" was not accepted by splunk but that did not change anything. We than added a fields.conf for the search head and the indexer cluster like:&lt;/P&gt;

&lt;P&gt;[site_id]&lt;BR /&gt;
INDEXED = true&lt;BR /&gt;
INDEXED_VALUE = false&lt;/P&gt;

&lt;P&gt;[site-id]&lt;BR /&gt;
INDEXED = true&lt;BR /&gt;
INDEXED_VALUE = false&lt;/P&gt;

&lt;P&gt;We tried with and without the "INDEXED_VALUES" attribute without any difference.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:22:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Why-does-this-indexed-field-search-give-the-wrong-results-when/m-p/431022#M5617</guid>
      <dc:creator>socconsulting</dc:creator>
      <dc:date>2020-09-29T22:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: Why does this indexed field search give the wrong results when looking for specific values?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Why-does-this-indexed-field-search-give-the-wrong-results-when/m-p/431023#M5618</link>
      <description>&lt;P&gt;SOLUTION:&lt;/P&gt;

&lt;P&gt;The field was not known to the search head in the context of the search app / system&lt;BR /&gt;
So we added a metadata export description on the search head inside our fields.conf&lt;/P&gt;

&lt;P&gt;my_fields_app/metadata/default.meta &lt;BR /&gt;
[]&lt;BR /&gt;
access = read : [ * ], write : [ admin ]&lt;BR /&gt;
export = system&lt;/P&gt;

&lt;P&gt;Now everything works like expected&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:23:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Why-does-this-indexed-field-search-give-the-wrong-results-when/m-p/431023#M5618</guid>
      <dc:creator>socconsulting</dc:creator>
      <dc:date>2020-09-29T22:23:07Z</dc:date>
    </item>
  </channel>
</rss>

