<?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 Search in square brackets in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-in-square-brackets/m-p/667155#M228879</link>
    <description>&lt;P&gt;I don't understand how this works, what should replace the square brackets in this situation or what does the search works here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=123 sourcetype=grades [|search index=123 sourcetype=grades line=6 AND class=4|return Name]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone explain this please?&lt;/P&gt;&lt;P&gt;I've tried to make it more simple with one search and get rid of the square brackets, but I always get different results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 02 Nov 2023 11:23:21 GMT</pubDate>
    <dc:creator>vanheer</dc:creator>
    <dc:date>2023-11-02T11:23:21Z</dc:date>
    <item>
      <title>Search in square brackets</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-in-square-brackets/m-p/667155#M228879</link>
      <description>&lt;P&gt;I don't understand how this works, what should replace the square brackets in this situation or what does the search works here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=123 sourcetype=grades [|search index=123 sourcetype=grades line=6 AND class=4|return Name]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone explain this please?&lt;/P&gt;&lt;P&gt;I've tried to make it more simple with one search and get rid of the square brackets, but I always get different results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 11:23:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-in-square-brackets/m-p/667155#M228879</guid>
      <dc:creator>vanheer</dc:creator>
      <dc:date>2023-11-02T11:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: Search in square brackets</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-in-square-brackets/m-p/667157#M228880</link>
      <description>&lt;P&gt;The search in the square brackets (the subsearch) is executed first. The results are then used to filter the main search. For example, if the subsearch returns 3 rows, these will be separate by ORs and the fields returned in each row will be separated by ANDs.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=123 sourcetype=grades ((line=6 AND class=4 AND index=123 AND _time=&amp;lt;whatever the time of the event is&amp;gt; AND &amp;lt;whatever other fields are in the event&amp;gt;) OR (line=6 AND class=4 AND index=123 AND _time=&amp;lt;whatever the time of the next event is&amp;gt; AND so on))&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 02 Nov 2023 11:26:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-in-square-brackets/m-p/667157#M228880</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-11-02T11:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: Search in square brackets</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-in-square-brackets/m-p/667161#M228882</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;You could evaluate this by running this&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=123 sourcetype=grades line=6 AND class=4 
| return Name&lt;/LI-CODE&gt;&lt;P&gt;If you have events which those values it returns&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Name="&amp;lt;value of field Name&amp;gt;"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Then it use that with your outer search&amp;nbsp;&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Thu, 02 Nov 2023 11:29:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-in-square-brackets/m-p/667161#M228882</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2023-11-02T11:29:49Z</dc:date>
    </item>
  </channel>
</rss>

