<?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: How to search if data contain value from the other fields? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-if-data-contain-value-from-the-other-fields/m-p/305402#M91696</link>
    <description>&lt;P&gt;Hi urapaveerapan,&lt;BR /&gt;
you can try to use &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Category="*short_description*" OR Subategory="*short_description*"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or try using the like option (see at &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.6.0/SearchReference/ConditionalFunctions"&gt;http://docs.splunk.com/Documentation/Splunk/6.6.0/SearchReference/ConditionalFunctions&lt;/A&gt;)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | where like(Category, "%short_description%") OR like(Subcategory, "%short_description%") 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Obviously this search will be not so quick!&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
    <pubDate>Mon, 22 May 2017 08:32:29 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2017-05-22T08:32:29Z</dc:date>
    <item>
      <title>How to search if data contain value from the other fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-if-data-contain-value-from-the-other-fields/m-p/305399#M91693</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I'm very new in Splunk, I'd like to find the event where the short description contain the "Category" or "Subcategory field. (Example in the the yellow highlight.&lt;BR /&gt;
  Other than the field value, how can I match the related words between the fields? &lt;BR /&gt;
For example, &lt;BR /&gt;
 "CBM Precast" related to "Truck loading" and "GI"&lt;BR /&gt;
If the Splunk found "Truck loading" or"GI", it also mean that this event match with "Category" field as well.&lt;/P&gt;

&lt;P&gt;Please help!!&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/2973i0172B29D1D111F2B/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 21 May 2017 14:59:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-if-data-contain-value-from-the-other-fields/m-p/305399#M91693</guid>
      <dc:creator>urapaveerapan</dc:creator>
      <dc:date>2017-05-21T14:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to search if data contain value from the other fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-if-data-contain-value-from-the-other-fields/m-p/305400#M91694</link>
      <description>&lt;P&gt;Hi urapaveerapan,&lt;BR /&gt;
you have to create a simple search like the following:&lt;BR /&gt;
if you want a value that fully matches the Category field&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=your_index sourcetype=your_sourcetype Category="CBM Precast" | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;if you want a value that partially matches the Category field&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=your_index sourcetype=your_sourcetype Category="*Precast*" | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or if you're not sure of the field to use in search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=your_index sourcetype=your_sourcetype Precast | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Beware that the field name is case sensitive, instead field value isn't.&lt;/P&gt;

&lt;P&gt;I suggest to follow the search tutorial that you can find at &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.6.0/SearchTutorial/WelcometotheSearchTutorial"&gt;http://docs.splunk.com/Documentation/Splunk/6.6.0/SearchTutorial/WelcometotheSearchTutorial&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2017 07:20:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-if-data-contain-value-from-the-other-fields/m-p/305400#M91694</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-05-22T07:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to search if data contain value from the other fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-if-data-contain-value-from-the-other-fields/m-p/305401#M91695</link>
      <description>&lt;P&gt;Dear Giuseppe,&lt;/P&gt;

&lt;P&gt;The search item is dynamic. It depend on the value in Category or Subcategory fields. So I cannot fill the extact word in its.&lt;BR /&gt;
Let say, if it is sql query, it gonna be like&lt;BR /&gt;
select * from [table_name] where [short description] like  '%'||Category||'%' or  [short description] like  '%'||Subcategory||'%'&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2017 08:04:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-if-data-contain-value-from-the-other-fields/m-p/305401#M91695</guid>
      <dc:creator>urapaveerapan</dc:creator>
      <dc:date>2017-05-22T08:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to search if data contain value from the other fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-if-data-contain-value-from-the-other-fields/m-p/305402#M91696</link>
      <description>&lt;P&gt;Hi urapaveerapan,&lt;BR /&gt;
you can try to use &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Category="*short_description*" OR Subategory="*short_description*"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or try using the like option (see at &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.6.0/SearchReference/ConditionalFunctions"&gt;http://docs.splunk.com/Documentation/Splunk/6.6.0/SearchReference/ConditionalFunctions&lt;/A&gt;)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | where like(Category, "%short_description%") OR like(Subcategory, "%short_description%") 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Obviously this search will be not so quick!&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2017 08:32:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-if-data-contain-value-from-the-other-fields/m-p/305402#M91696</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-05-22T08:32:29Z</dc:date>
    </item>
  </channel>
</rss>

