<?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 TERM(): How does it work under the covers ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/TERM-How-does-it-work-under-the-covers/m-p/569248#M198408</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a query which I am not sure why its not working,&lt;/P&gt;&lt;P&gt;Assume I have the following JSON record, which has been extracted at index-time&lt;/P&gt;&lt;P&gt;index: network&lt;BR /&gt;sourcetype: devices&lt;BR /&gt;record: { "deviceId" : 1234, "hostName": "Router1}&lt;/P&gt;&lt;P&gt;1. index=network sourcetype=devices deviceId=1234 =&amp;gt; works as expected&lt;/P&gt;&lt;P&gt;2. index=network TERM(sourcetype::devices) =&amp;gt; works as expected&lt;BR /&gt;3. index=network&amp;nbsp;TERM(sourcetype::devices) deviceId=1234 =&amp;gt; Fails, returns 0 records&lt;BR /&gt;4. index=network&amp;nbsp;TERM(sourcetype::devices) earliest=-7d@d =&amp;gt; Fails, returns 0 records&lt;/P&gt;&lt;P&gt;5. index=network sourcetype::devices deviceId=1234 =&amp;gt; works as expected&lt;BR /&gt;6. index=network sourcetype::devices deviceId::1234 =&amp;gt; works as expected&lt;BR /&gt;7. index=network sourcetype::devices deviceId::1234 earliest=-7d@d =&amp;gt; works as expected&lt;/P&gt;&lt;P&gt;The real question is, why do queries 3 and 4 fail, when the others work, especially when I can see that query 2 works and returns the correct data.&lt;/P&gt;&lt;P&gt;What impact does TERM() have in the process flow, such that earliest and = make it fail ?&lt;/P&gt;&lt;P&gt;cheers&lt;BR /&gt;-brett&lt;/P&gt;</description>
    <pubDate>Fri, 01 Oct 2021 00:06:13 GMT</pubDate>
    <dc:creator>bdunstan</dc:creator>
    <dc:date>2021-10-01T00:06:13Z</dc:date>
    <item>
      <title>TERM(): How does it work under the covers ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/TERM-How-does-it-work-under-the-covers/m-p/569248#M198408</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a query which I am not sure why its not working,&lt;/P&gt;&lt;P&gt;Assume I have the following JSON record, which has been extracted at index-time&lt;/P&gt;&lt;P&gt;index: network&lt;BR /&gt;sourcetype: devices&lt;BR /&gt;record: { "deviceId" : 1234, "hostName": "Router1}&lt;/P&gt;&lt;P&gt;1. index=network sourcetype=devices deviceId=1234 =&amp;gt; works as expected&lt;/P&gt;&lt;P&gt;2. index=network TERM(sourcetype::devices) =&amp;gt; works as expected&lt;BR /&gt;3. index=network&amp;nbsp;TERM(sourcetype::devices) deviceId=1234 =&amp;gt; Fails, returns 0 records&lt;BR /&gt;4. index=network&amp;nbsp;TERM(sourcetype::devices) earliest=-7d@d =&amp;gt; Fails, returns 0 records&lt;/P&gt;&lt;P&gt;5. index=network sourcetype::devices deviceId=1234 =&amp;gt; works as expected&lt;BR /&gt;6. index=network sourcetype::devices deviceId::1234 =&amp;gt; works as expected&lt;BR /&gt;7. index=network sourcetype::devices deviceId::1234 earliest=-7d@d =&amp;gt; works as expected&lt;/P&gt;&lt;P&gt;The real question is, why do queries 3 and 4 fail, when the others work, especially when I can see that query 2 works and returns the correct data.&lt;/P&gt;&lt;P&gt;What impact does TERM() have in the process flow, such that earliest and = make it fail ?&lt;/P&gt;&lt;P&gt;cheers&lt;BR /&gt;-brett&lt;/P&gt;</description>
      <pubDate>Fri, 01 Oct 2021 00:06:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/TERM-How-does-it-work-under-the-covers/m-p/569248#M198408</guid>
      <dc:creator>bdunstan</dc:creator>
      <dc:date>2021-10-01T00:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: TERM(): How does it work under the covers ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/TERM-How-does-it-work-under-the-covers/m-p/572173#M199418</link>
      <description>&lt;P&gt;Hi&amp;nbsp;bdunstan,&lt;/P&gt;&lt;P&gt;Can you please run searches (3) and (4) to see how lipsy searches differ in the search.log and then we can narrow down to issue for failures&lt;/P&gt;&lt;P&gt;In general&amp;nbsp;&lt;STRONG&gt;TERM&lt;/STRONG&gt; Match whatever is inside the parentheses as a single term in the index, even if it contains characters that are usually recognized as minor segmenters, such as periods or underscores.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here's some good documentation on this.&lt;BR /&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/6.4.2/Search/UseCASEandTERMtomatchphrases" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/6.4.2/Search/UseCASEandTERMtomatchphrases&lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;------&lt;/P&gt;&lt;P&gt;An upvote would be appreciated and Accept Solution if it helps!&lt;/P&gt;</description>
      <pubDate>Sun, 24 Oct 2021 21:31:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/TERM-How-does-it-work-under-the-covers/m-p/572173#M199418</guid>
      <dc:creator>PradReddy</dc:creator>
      <dc:date>2021-10-24T21:31:48Z</dc:date>
    </item>
  </channel>
</rss>

