<?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: When do breaker characters apply? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/When-do-breaker-characters-apply/m-p/626850#M217858</link>
    <description>&lt;P&gt;This is the defining document:&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Search#search" target="_blank" rel="noopener"&gt;search&lt;/A&gt;; I would pay special attention under &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Search#Logical_expression_options" target="_blank" rel="noopener"&gt;Logical expression options&lt;/A&gt;,&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Search#Comparison_expression_options" target="_blank" rel="noopener"&gt;Comparison expression options&lt;/A&gt;,&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Search#Quotes_and_escaping_characters" target="_blank" rel="noopener"&gt;Quotes and escaping characters&lt;/A&gt;, and &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Search#The_implied_search_command" target="_blank" rel="noopener"&gt;The implied search command&lt;/A&gt;.&amp;nbsp; In addition to white space and double quotation mark (") which are obvious, any unquoted occurrence of parentheses ("(" and ")", unquoted), equal (=), less-than (&amp;lt;), and greater-than (&amp;gt;) will be interpreted by SPL as part (or whole) of an operator; any unquoted occurrence of pipe (|) is interpreted as command separator; select unquoted backslash sequences are interpreted by SPL, e.g., \", \|, and \\; unquoted asterisk (*) is interpreted as wildcard. &amp;nbsp; Also look at&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Search/Typesofcommands#collapseDesktop7" target="_blank" rel="noopener"&gt;Subsearches&lt;/A&gt;. &amp;nbsp;Any unquoted occurrence of left square bracket ([) is interpreted as the beginning of a subsearch; unquoted right square bracket (]) is considered the ending of a subsearch.&lt;/P&gt;&lt;P data-unlink="true"&gt;Other than these, any character in a string is considered a literal string. &amp;nbsp;This is why &lt;FONT face="andale mono,times"&gt;index=&lt;/FONT&gt;&lt;FONT face="andale mono,times"&gt;WinEventLog:System&lt;/FONT&gt;, or even &lt;FONT face="andale mono,times"&gt;index =&amp;nbsp;WinEventLog:System&lt;/FONT&gt; is equivalent to &lt;FONT face="andale mono,times"&gt;index="WinEventLog:System"&lt;/FONT&gt;. &amp;nbsp;Yes, you can even name your source WinEventLog!System, WinEventLog/System, WinEventLog\System,&amp;nbsp;WinEventLog\/System,&amp;nbsp;even WinEventLog@System or WinEventLog&amp;amp;System and not quote it.&lt;/P&gt;&lt;P data-unlink="true"&gt;Even in the search document itself, some examples include unquoted strings that could be unsafe in some other contexts. &amp;nbsp;For example,&lt;/P&gt;&lt;BLOCKQUOTE&gt;The AND operator is always implied between terms and expressions. For example, web error is the same as web AND error. Specifying clientip=192.0.2.255 earliest=-1h@h is the same as clientip=192.0.2.255 AND earliest=-1h@h. So unless you want to include it for clarity reasons, you do not need to specify the AND operator. -&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Search#Required_arguments" target="_blank" rel="noopener"&gt;Required arguments&lt;/A&gt;&lt;/BLOCKQUOTE&gt;</description>
    <pubDate>Wed, 11 Jan 2023 20:11:04 GMT</pubDate>
    <dc:creator>yuanliu</dc:creator>
    <dc:date>2023-01-11T20:11:04Z</dc:date>
    <item>
      <title>When do breaker characters apply?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/When-do-breaker-characters-apply/m-p/626614#M217797</link>
      <description>&lt;P&gt;I have read the documentation about breaker characters, but within our organization there is disagreement about when they actually come into play in the main search.&lt;/P&gt;&lt;P&gt;The docs don't say anything about it either way, but some say we must use quotes around sourcetype, for example:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;index=iis sourcetype="http_err_logs" status=500 ...etc&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;It goes without saying that they're needed within literal search phrases; the text of a specific error message, for example. But do they really also apply to comparisons for standard fields like index or sourcetype?&lt;BR /&gt;&lt;BR /&gt;As another example, we have sourcetypes with names like "WinEventLog:Application" and "WinEventLog:System" and some are saying that colon becomes a breaker which leads to a search of the entire raw event data. We also have index names with underscores, and so on.&lt;/P&gt;&lt;P&gt;As a result, at this point we're playing it safe and quoting anything that has breaker characters, but is there any documentation that describes where they're actually applied or not?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 15:53:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/When-do-breaker-characters-apply/m-p/626614#M217797</guid>
      <dc:creator>mv10</dc:creator>
      <dc:date>2023-01-10T15:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: When do breaker characters apply?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/When-do-breaker-characters-apply/m-p/626632#M217800</link>
      <description>&lt;P&gt;I use index=_internal all the time with no indication that Splunk is searching anything else.&lt;/P&gt;&lt;P&gt;One way to see who is right would be to compare the litsearch for each query as shown in Job Inspector.&lt;/P&gt;&lt;P&gt;This document may help:&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Search/Eventsegmentationandsearching" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Search/Eventsegmentationandsearching&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 16:42:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/When-do-breaker-characters-apply/m-p/626632#M217800</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-01-10T16:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: When do breaker characters apply?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/When-do-breaker-characters-apply/m-p/626645#M217805</link>
      <description>&lt;P&gt;Good idea about the job inspector, I'll have to play with it a bit.&lt;/P&gt;&lt;P&gt;Those are the docs I was referring to in my question. It defines major and minor breakers but never clearly explains exactly when one or the other applies. It has the "app=" example and shows the minor tokens in the table but the text doesn't mention them at all.&lt;/P&gt;&lt;P&gt;I wouldn't expect _internal to match against anything else unless you also had other indices with names using the word "internal" with other breakers ("accounting_internal" for example). Personally I strongly doubt "index" would ever use breakers (makes no sense), but the rest of the fields, I'm not so sure.&lt;/P&gt;&lt;P&gt;My sourcetype examples (such as WinEventLog:System) do seem to work as expected even without quotes, the thinking is that it's just an efficiency thing. That's one I could test, but where does it end? Extracted fields? Only free-form search text?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 17:52:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/When-do-breaker-characters-apply/m-p/626645#M217805</guid>
      <dc:creator>mv10</dc:creator>
      <dc:date>2023-01-10T17:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: When do breaker characters apply?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/When-do-breaker-characters-apply/m-p/626850#M217858</link>
      <description>&lt;P&gt;This is the defining document:&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Search#search" target="_blank" rel="noopener"&gt;search&lt;/A&gt;; I would pay special attention under &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Search#Logical_expression_options" target="_blank" rel="noopener"&gt;Logical expression options&lt;/A&gt;,&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Search#Comparison_expression_options" target="_blank" rel="noopener"&gt;Comparison expression options&lt;/A&gt;,&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Search#Quotes_and_escaping_characters" target="_blank" rel="noopener"&gt;Quotes and escaping characters&lt;/A&gt;, and &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Search#The_implied_search_command" target="_blank" rel="noopener"&gt;The implied search command&lt;/A&gt;.&amp;nbsp; In addition to white space and double quotation mark (") which are obvious, any unquoted occurrence of parentheses ("(" and ")", unquoted), equal (=), less-than (&amp;lt;), and greater-than (&amp;gt;) will be interpreted by SPL as part (or whole) of an operator; any unquoted occurrence of pipe (|) is interpreted as command separator; select unquoted backslash sequences are interpreted by SPL, e.g., \", \|, and \\; unquoted asterisk (*) is interpreted as wildcard. &amp;nbsp; Also look at&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Search/Typesofcommands#collapseDesktop7" target="_blank" rel="noopener"&gt;Subsearches&lt;/A&gt;. &amp;nbsp;Any unquoted occurrence of left square bracket ([) is interpreted as the beginning of a subsearch; unquoted right square bracket (]) is considered the ending of a subsearch.&lt;/P&gt;&lt;P data-unlink="true"&gt;Other than these, any character in a string is considered a literal string. &amp;nbsp;This is why &lt;FONT face="andale mono,times"&gt;index=&lt;/FONT&gt;&lt;FONT face="andale mono,times"&gt;WinEventLog:System&lt;/FONT&gt;, or even &lt;FONT face="andale mono,times"&gt;index =&amp;nbsp;WinEventLog:System&lt;/FONT&gt; is equivalent to &lt;FONT face="andale mono,times"&gt;index="WinEventLog:System"&lt;/FONT&gt;. &amp;nbsp;Yes, you can even name your source WinEventLog!System, WinEventLog/System, WinEventLog\System,&amp;nbsp;WinEventLog\/System,&amp;nbsp;even WinEventLog@System or WinEventLog&amp;amp;System and not quote it.&lt;/P&gt;&lt;P data-unlink="true"&gt;Even in the search document itself, some examples include unquoted strings that could be unsafe in some other contexts. &amp;nbsp;For example,&lt;/P&gt;&lt;BLOCKQUOTE&gt;The AND operator is always implied between terms and expressions. For example, web error is the same as web AND error. Specifying clientip=192.0.2.255 earliest=-1h@h is the same as clientip=192.0.2.255 AND earliest=-1h@h. So unless you want to include it for clarity reasons, you do not need to specify the AND operator. -&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Search#Required_arguments" target="_blank" rel="noopener"&gt;Required arguments&lt;/A&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Wed, 11 Jan 2023 20:11:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/When-do-breaker-characters-apply/m-p/626850#M217858</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-01-11T20:11:04Z</dc:date>
    </item>
  </channel>
</rss>

