<?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 does my search fail when searching indexed extractions with double colons where the value contains spaces? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-does-my-search-fail-when-searching-indexed-extractions-with/m-p/265920#M79933</link>
    <description>&lt;P&gt;Yes and I think it is down to the order of filtering and the application of calculated fields and lookups.&lt;/P&gt;

&lt;P&gt;For a search that ends up returning 48,532 events (historical so no change in the data between runs) the :: search does&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;1.99    command.search.calcfields   13  48,532  48,532
0.77    command.search.lookups  13  48,532  48,532
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Compared to the = search doing&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2.58    command.search.calcfields   12  58,963  58,963
1.05    command.search.lookups  12  58,963  58,963
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The more events the :: discards the better the performance improvement (and I do appreciate that moving the lookups and field calculations into the search would probably yield the same results but the value of that enrichment always being available is pretty high)&lt;/P&gt;

&lt;P&gt;It was more of a "does anyone know of an existing bug - before I keep digging" kind of question.  Next step is to copy some of the data and test on 6.3.2 before bothering support.&lt;/P&gt;</description>
    <pubDate>Fri, 05 Feb 2016 17:44:49 GMT</pubDate>
    <dc:creator>mevans292</dc:creator>
    <dc:date>2016-02-05T17:44:49Z</dc:date>
    <item>
      <title>Why does my search fail when searching indexed extractions with double colons where the value contains spaces?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-my-search-fail-when-searching-indexed-extractions-with/m-p/265915#M79928</link>
      <description>&lt;P&gt;We are using a CSV input, which generates indexed extractions - some of the field values contain spaces.&lt;/P&gt;

&lt;P&gt;Here is some walklex output that shows the values captured in the .tsidx&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;1887 2 product_categorization_tier_2::security systems
1888 3 product_categorization_tier_2::server systems
1889 1 product_categorization_tier_2::system software
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However all of the following search terms fail:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;product_categorization_tier_2::security systems
product_categorization_tier_2::"security systems"
"product_categorization_tier_2::security systems"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but &lt;CODE&gt;product_categorization_tier_2::security*&lt;/CODE&gt; works.&lt;/P&gt;

&lt;P&gt;Where the searches work (in fields with no spaces) there is a noticeable improvement in search performance.&lt;/P&gt;

&lt;P&gt;Looking at the job inspector, it looks like something is going wrong as the search term is translated to a remote search:&lt;/P&gt;

&lt;P&gt;The search: search index=xxxxxx product_categorization_tier_2::"security systems"&lt;/P&gt;

&lt;P&gt;Becomes: litsearch index=xxxxxx &lt;STRONG&gt;product_categorization_tier_2:: "security systems"&lt;/STRONG&gt; | &lt;/P&gt;

&lt;P&gt;Note the extra space after the double colon.&lt;/P&gt;

&lt;P&gt;So - am I using an incorrect format for dealing with the spaces or is this a bug? (Splunk 6.3.0)&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:39:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-my-search-fail-when-searching-indexed-extractions-with/m-p/265915#M79928</guid>
      <dc:creator>mevans292</dc:creator>
      <dc:date>2020-09-29T08:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my search fail when searching indexed extractions with double colons where the value contains spaces?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-my-search-fail-when-searching-indexed-extractions-with/m-p/265916#M79929</link>
      <description>&lt;P&gt;Have you tried searching for  product_categorization_tier_2="security systems" ? That is field=value, like you have for index=xxxxxx&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:40:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-my-search-fail-when-searching-indexed-extractions-with/m-p/265916#M79929</guid>
      <dc:creator>jplumsdaine22</dc:creator>
      <dc:date>2020-09-29T08:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my search fail when searching indexed extractions with double colons where the value contains spaces?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-my-search-fail-when-searching-indexed-extractions-with/m-p/265917#M79930</link>
      <description>&lt;P&gt;Yes - that works but as noted in the question where :: works (no spaces in the values) the searches are significantly quicker than the equivilent search using =&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2016 13:32:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-my-search-fail-when-searching-indexed-extractions-with/m-p/265917#M79930</guid>
      <dc:creator>mevans292</dc:creator>
      <dc:date>2016-02-05T13:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my search fail when searching indexed extractions with double colons where the value contains spaces?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-my-search-fail-when-searching-indexed-extractions-with/m-p/265918#M79931</link>
      <description>&lt;P&gt;Interesting I didn't know you could do that  (other readers see here: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.3.3/Search/Usefieldstoretrieveevents"&gt;http://docs.splunk.com/Documentation/Splunk/6.3.3/Search/Usefieldstoretrieveevents&lt;/A&gt; look for "double colon")&lt;/P&gt;

&lt;P&gt;I can't get it working either. I tries escaping with &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;\" or  &amp;amp;quot; 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;UL&gt;
&lt;LI&gt;no joy. &lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;I'm only getting very minor performance improvements  when searching for fields  like &lt;CODE&gt;key::no_space&lt;/CODE&gt; - milliseconds differences compared to key=value over millions of results.  Are you seeing more dramatic improvements?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2016 15:48:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-my-search-fail-when-searching-indexed-extractions-with/m-p/265918#M79931</guid>
      <dc:creator>jplumsdaine22</dc:creator>
      <dc:date>2016-02-05T15:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my search fail when searching indexed extractions with double colons where the value contains spaces?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-my-search-fail-when-searching-indexed-extractions-with/m-p/265919#M79932</link>
      <description>&lt;P&gt;Sometimes - on some queries I have seen a 20% difference on 30-60 seconds of execution time.  Looking at the job inspector the key difference seems to be that the :: filter applies before lookups and field calculations, so that less overall "work" gets done - if you have no auto lookups or calculated fields that may be why we see such different results.  &lt;/P&gt;

&lt;P&gt;The more events that the :: operation filters out the better the performance gain&lt;/P&gt;

&lt;P&gt;For a historical search - so the same number of events are involved (58,963 in scope, 48532 matching) I see the :: search do:&lt;/P&gt;

&lt;P&gt;1.99    command.search.calcfields   13  48,532  48,532&lt;BR /&gt;
and&lt;BR /&gt;
0.77    command.search.lookups  13  48,532  48,532&lt;/P&gt;

&lt;P&gt;While the = search does:&lt;/P&gt;

&lt;P&gt;2.58    command.search.calcfields   12  58,963  58,963&lt;BR /&gt;
and&lt;BR /&gt;
1.05    command.search.lookups  12  58,963  58,963&lt;/P&gt;

&lt;P&gt;I need to try on 6.3.2 before raising a support ticket.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2016 17:34:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-my-search-fail-when-searching-indexed-extractions-with/m-p/265919#M79932</guid>
      <dc:creator>mevans292</dc:creator>
      <dc:date>2016-02-05T17:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my search fail when searching indexed extractions with double colons where the value contains spaces?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-my-search-fail-when-searching-indexed-extractions-with/m-p/265920#M79933</link>
      <description>&lt;P&gt;Yes and I think it is down to the order of filtering and the application of calculated fields and lookups.&lt;/P&gt;

&lt;P&gt;For a search that ends up returning 48,532 events (historical so no change in the data between runs) the :: search does&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;1.99    command.search.calcfields   13  48,532  48,532
0.77    command.search.lookups  13  48,532  48,532
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Compared to the = search doing&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2.58    command.search.calcfields   12  58,963  58,963
1.05    command.search.lookups  12  58,963  58,963
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The more events the :: discards the better the performance improvement (and I do appreciate that moving the lookups and field calculations into the search would probably yield the same results but the value of that enrichment always being available is pretty high)&lt;/P&gt;

&lt;P&gt;It was more of a "does anyone know of an existing bug - before I keep digging" kind of question.  Next step is to copy some of the data and test on 6.3.2 before bothering support.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2016 17:44:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-my-search-fail-when-searching-indexed-extractions-with/m-p/265920#M79933</guid>
      <dc:creator>mevans292</dc:creator>
      <dc:date>2016-02-05T17:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my search fail when searching indexed extractions with double colons where the value contains spaces?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-my-search-fail-when-searching-indexed-extractions-with/m-p/265921#M79934</link>
      <description>&lt;P&gt;Indexed terms are just that...terms.  They may look like fields with a :: operator (name::value vs name=value) but they are not fields.  They are just explicitly formatted terms in TSIDX and within a given term, spaces are just characters like any other.&lt;/P&gt;

&lt;P&gt;When processing SPL, however:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;spaces &lt;STRONG&gt;separate&lt;/STRONG&gt; terms&lt;/LI&gt;
&lt;LI&gt;the quotes around a list of terms are ignored when searching TSIDX &lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;So Splunk is interpreting each of your "non-working" SPL examples as either a search for&lt;BR /&gt;
&lt;CODE&gt;product_categorization_tier_2::security AND systems&lt;/CODE&gt; or &lt;CODE&gt;product_categorization_tier_2:: AND security AND systems&lt;/CODE&gt;&lt;BR /&gt;
as follows:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;&lt;CODE&gt;product_categorization_tier_2::security systems&lt;/CODE&gt; (2 terms) because spaces separate terms&lt;/LI&gt;
&lt;LI&gt;&lt;CODE&gt;product_categorization_tier_2::"security systems"&lt;/CODE&gt; (3 terms) because when Splunk sees non-escaped quotes it assumes the intention is to begin a new (list of) term(s) even if there is no space &lt;STRONG&gt;and&lt;/STRONG&gt; quotes are ignored when searching TSIDX&lt;/LI&gt;
&lt;LI&gt;&lt;CODE&gt;"product_categorization_tier_2::security systems"&lt;/CODE&gt; (2 terms) because quotes are ignored when searching TSIDX&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;&lt;CODE&gt;product_categorization_tier_2::security*&lt;/CODE&gt;, in the other hand, will match any term beginning with &lt;CODE&gt;product_categorization_tier_2::security&lt;/CODE&gt; whether or not the remainder of the term contains spaces.&lt;/P&gt;

&lt;P&gt;To achieve what you are trying to do use &lt;CODE&gt;TERM(product_categorization_tier_2::security systems)&lt;/CODE&gt; which causes everything in the parentheses to be considered a single term, including the space.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Dec 2016 19:32:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-my-search-fail-when-searching-indexed-extractions-with/m-p/265921#M79934</guid>
      <dc:creator>ybongart_splunk</dc:creator>
      <dc:date>2016-12-27T19:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: Why does my search fail when searching indexed extractions with double colons where the value contains spaces?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-my-search-fail-when-searching-indexed-extractions-with/m-p/265922#M79935</link>
      <description>&lt;P&gt;In Splunk 7.0.3.1, using TERM() didn't return results , but escaping the space did:&lt;BR /&gt;
&lt;CODE&gt;product_categorization_tier_2::security\ systems&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 13:07:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-my-search-fail-when-searching-indexed-extractions-with/m-p/265922#M79935</guid>
      <dc:creator>mschaaf</dc:creator>
      <dc:date>2019-11-19T13:07:27Z</dc:date>
    </item>
  </channel>
</rss>

