<?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 are my search results differing between two index-time fields? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-are-my-search-results-differing-between-two-index-time/m-p/207498#M60496</link>
    <description>&lt;P&gt;I have two &lt;STRONG&gt;index-time&lt;/STRONG&gt; fields in my app - &lt;CODE&gt;barcodeKey&lt;/CODE&gt; and &lt;CODE&gt;trackId&lt;/CODE&gt;. &lt;CODE&gt;trackId&lt;/CODE&gt; is derived from &lt;CODE&gt;barcodeKey&lt;/CODE&gt; as a suffix.&lt;BR /&gt;
The application can search by either one of them, and most searches for the barcode and the trackId derived from it return the same set of events.&lt;/P&gt;

&lt;P&gt;However, some of the codes work only for &lt;CODE&gt;barcodeKey&lt;/CODE&gt; and not &lt;CODE&gt;trackId&lt;/CODE&gt;. While investigating, I ran a search for barcodeKey and built a table of barcodeKey and trackId, then clicked on trackId to "include only those results".&lt;/P&gt;

&lt;P&gt;Here is the search string which it generated:&lt;BR /&gt;
&lt;CODE&gt;index=myIndex sourcetype=mySourceType barcodeKey="9611019060145900336056" | search trackId=060145900336056&lt;/CODE&gt;&lt;BR /&gt;
The search still returned the same number of events as the initial barcodeKey search.&lt;/P&gt;

&lt;P&gt;Since there is nothing transforming or renaming the fields in the above search string, shouldn't it behave exactly the same as:&lt;BR /&gt;
&lt;CODE&gt;index=myIndex sourcetype=mySourceType barcodeKey="9611019060145900336056" AND trackId=060145900336056&lt;/CODE&gt; or even just the &lt;BR /&gt;
&lt;CODE&gt;index=myIndex sourcetype=mySourceType barcodeKey="9611019060145900336056" trackId=060145900336056&lt;/CODE&gt;, should it?&lt;/P&gt;

&lt;P&gt;To my surprise, the last two searches returned no events! Same datetime range.&lt;/P&gt;

&lt;P&gt;In fact, I went to the search string and fully removed the &lt;CODE&gt;barcodeKey="..."&lt;/CODE&gt; condition. The&lt;BR /&gt;
&lt;CODE&gt;index=myIndex sourcetype=mySourceType trackId=060145900336056&lt;/CODE&gt;&lt;BR /&gt;
search returns no events. This one:&lt;BR /&gt;
&lt;CODE&gt;index=myIndex sourcetype=mySourceType | search trackId=060145900336056&lt;/CODE&gt;&lt;BR /&gt;
does bring back the expected set!&lt;/P&gt;

&lt;P&gt;This is Splunk 6.3.1. I'm at a loss - any ideas what might be happening here?&lt;/P&gt;</description>
    <pubDate>Wed, 02 Nov 2016 17:27:16 GMT</pubDate>
    <dc:creator>arkadyz1</dc:creator>
    <dc:date>2016-11-02T17:27:16Z</dc:date>
    <item>
      <title>Why are my search results differing between two index-time fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-are-my-search-results-differing-between-two-index-time/m-p/207498#M60496</link>
      <description>&lt;P&gt;I have two &lt;STRONG&gt;index-time&lt;/STRONG&gt; fields in my app - &lt;CODE&gt;barcodeKey&lt;/CODE&gt; and &lt;CODE&gt;trackId&lt;/CODE&gt;. &lt;CODE&gt;trackId&lt;/CODE&gt; is derived from &lt;CODE&gt;barcodeKey&lt;/CODE&gt; as a suffix.&lt;BR /&gt;
The application can search by either one of them, and most searches for the barcode and the trackId derived from it return the same set of events.&lt;/P&gt;

&lt;P&gt;However, some of the codes work only for &lt;CODE&gt;barcodeKey&lt;/CODE&gt; and not &lt;CODE&gt;trackId&lt;/CODE&gt;. While investigating, I ran a search for barcodeKey and built a table of barcodeKey and trackId, then clicked on trackId to "include only those results".&lt;/P&gt;

&lt;P&gt;Here is the search string which it generated:&lt;BR /&gt;
&lt;CODE&gt;index=myIndex sourcetype=mySourceType barcodeKey="9611019060145900336056" | search trackId=060145900336056&lt;/CODE&gt;&lt;BR /&gt;
The search still returned the same number of events as the initial barcodeKey search.&lt;/P&gt;

&lt;P&gt;Since there is nothing transforming or renaming the fields in the above search string, shouldn't it behave exactly the same as:&lt;BR /&gt;
&lt;CODE&gt;index=myIndex sourcetype=mySourceType barcodeKey="9611019060145900336056" AND trackId=060145900336056&lt;/CODE&gt; or even just the &lt;BR /&gt;
&lt;CODE&gt;index=myIndex sourcetype=mySourceType barcodeKey="9611019060145900336056" trackId=060145900336056&lt;/CODE&gt;, should it?&lt;/P&gt;

&lt;P&gt;To my surprise, the last two searches returned no events! Same datetime range.&lt;/P&gt;

&lt;P&gt;In fact, I went to the search string and fully removed the &lt;CODE&gt;barcodeKey="..."&lt;/CODE&gt; condition. The&lt;BR /&gt;
&lt;CODE&gt;index=myIndex sourcetype=mySourceType trackId=060145900336056&lt;/CODE&gt;&lt;BR /&gt;
search returns no events. This one:&lt;BR /&gt;
&lt;CODE&gt;index=myIndex sourcetype=mySourceType | search trackId=060145900336056&lt;/CODE&gt;&lt;BR /&gt;
does bring back the expected set!&lt;/P&gt;

&lt;P&gt;This is Splunk 6.3.1. I'm at a loss - any ideas what might be happening here?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2016 17:27:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-are-my-search-results-differing-between-two-index-time/m-p/207498#M60496</guid>
      <dc:creator>arkadyz1</dc:creator>
      <dc:date>2016-11-02T17:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: Why are my search results differing between two index-time fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-are-my-search-results-differing-between-two-index-time/m-p/207499#M60497</link>
      <description>&lt;P&gt;An update for the curious:&lt;/P&gt;

&lt;P&gt;I had a &lt;CODE&gt;fields.conf&lt;/CODE&gt; file which had two stanzas:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[barcodeKey]
INDEXED = true

[trackId]
INDEXED = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Once I removed those INDEXED properties, a search (not exactly the same but extremely similar and suffering from exactly the same symptoms) started working! I then ran those exact searches and they started working as well.&lt;/P&gt;

&lt;P&gt;My problem with all this is that my fix runs contrary to the description of the INDEXED property in &lt;CODE&gt;fields.conf&lt;/CODE&gt;. However, &lt;CODE&gt;INDEXED_VALUE&lt;/CODE&gt;, if set to &lt;CODE&gt;true&lt;/CODE&gt;, would have produced this exact effect in trackId searches, so I wonder if there is a bug with the processing of those two properties flipped.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2016 21:50:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-are-my-search-results-differing-between-two-index-time/m-p/207499#M60497</guid>
      <dc:creator>arkadyz1</dc:creator>
      <dc:date>2016-11-07T21:50:31Z</dc:date>
    </item>
  </channel>
</rss>

