<?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 do I turn search terms into an extracted field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-turn-search-terms-into-an-extracted-field/m-p/436731#M124441</link>
    <description>&lt;P&gt;@saqibhome , thanks for posting on Splunk Answers.&lt;/P&gt;

&lt;P&gt;But @pyrowood is right.  if you want get this answered, you need to add more context to your question. Our community won't be able to help you if they don't have enough information to understand your problem.&lt;/P&gt;

&lt;P&gt;Please see our &lt;A href="http://docs.splunk.com/Documentation/Splunkbase/splunkbase/Answers/Questions"&gt;Answers&lt;/A&gt; manual to see how to appropriately ask a question on the site.&lt;/P&gt;</description>
    <pubDate>Thu, 30 Aug 2018 21:42:53 GMT</pubDate>
    <dc:creator>mstjohn_splunk</dc:creator>
    <dc:date>2018-08-30T21:42:53Z</dc:date>
    <item>
      <title>How do I turn search terms into an extracted field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-turn-search-terms-into-an-extracted-field/m-p/436729#M124439</link>
      <description>&lt;P&gt;I would like to turn the seach terms into a extract field at the time of search. For e.g.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"search term 1" OR "search term 2" OR "search term 3" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Should become &lt;STRONG&gt;one&lt;/STRONG&gt; extracted field. Is that possible in Splunk?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 20:46:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-turn-search-terms-into-an-extracted-field/m-p/436729#M124439</guid>
      <dc:creator>saqibhome</dc:creator>
      <dc:date>2018-08-30T20:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do I turn search terms into an extracted field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-turn-search-terms-into-an-extracted-field/m-p/436730#M124440</link>
      <description>&lt;P&gt;What? &lt;/P&gt;

&lt;P&gt;You need to give us more information about what you are trying to do. It's not very clear, sorry. &lt;/P&gt;

&lt;P&gt;Do you have some sample events on your hands? &lt;BR /&gt;
Maybe describe what your expected Output should look like.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 21:01:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-turn-search-terms-into-an-extracted-field/m-p/436730#M124440</guid>
      <dc:creator>horsefez</dc:creator>
      <dc:date>2018-08-30T21:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do I turn search terms into an extracted field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-turn-search-terms-into-an-extracted-field/m-p/436731#M124441</link>
      <description>&lt;P&gt;@saqibhome , thanks for posting on Splunk Answers.&lt;/P&gt;

&lt;P&gt;But @pyrowood is right.  if you want get this answered, you need to add more context to your question. Our community won't be able to help you if they don't have enough information to understand your problem.&lt;/P&gt;

&lt;P&gt;Please see our &lt;A href="http://docs.splunk.com/Documentation/Splunkbase/splunkbase/Answers/Questions"&gt;Answers&lt;/A&gt; manual to see how to appropriately ask a question on the site.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 21:42:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-turn-search-terms-into-an-extracted-field/m-p/436731#M124441</guid>
      <dc:creator>mstjohn_splunk</dc:creator>
      <dc:date>2018-08-30T21:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do I turn search terms into an extracted field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-turn-search-terms-into-an-extracted-field/m-p/436732#M124442</link>
      <description>&lt;P&gt;i think what you are looking for is calls &lt;CODE&gt;macros&lt;/CODE&gt; &lt;BR /&gt;
read here:&lt;BR /&gt;&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Splexicon:Searchmacro"&gt;https://docs.splunk.com/Splexicon:Searchmacro&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/7.1.2/Knowledge/Searchmacroexamples"&gt;http://docs.splunk.com/Documentation/Splunk/7.1.2/Knowledge/Searchmacroexamples&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;but maybe you mean &lt;CODE&gt;eventtype&lt;/CODE&gt;.&lt;BR /&gt;
read here:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/7.1.2/Knowledge/Abouteventtypes"&gt;http://docs.splunk.com/Documentation/Splunk/7.1.2/Knowledge/Abouteventtypes&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;hope it helps&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2018 22:00:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-turn-search-terms-into-an-extracted-field/m-p/436732#M124442</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2018-08-30T22:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do I turn search terms into an extracted field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-turn-search-terms-into-an-extracted-field/m-p/436733#M124443</link>
      <description>&lt;P&gt;Figured it out. I am using the &lt;STRONG&gt;eval&lt;/STRONG&gt; along with &lt;STRONG&gt;case&lt;/STRONG&gt; to create the extracted field from the search terms. e.g.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"search term 1" OR "search term 2" OR "search term 3" | eval search_term=case(like(_raw, "%search term 1%"), "search term 1", like(_raw, "%search term 2%"), "search term 2",  like(_raw, "%search term 3%"), "search term 3")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;search_term&lt;/STRONG&gt; becomes the extracted field&lt;/P&gt;</description>
      <pubDate>Fri, 31 Aug 2018 17:48:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-turn-search-terms-into-an-extracted-field/m-p/436733#M124443</guid>
      <dc:creator>saqibhome</dc:creator>
      <dc:date>2018-08-31T17:48:15Z</dc:date>
    </item>
  </channel>
</rss>

