<?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: Is it possible to use match in an initial search execution? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-use-match-in-an-initial-search-execution/m-p/405759#M117300</link>
    <description>&lt;P&gt;ah...rtfm...got it.  &lt;/P&gt;</description>
    <pubDate>Thu, 06 Jun 2019 00:21:06 GMT</pubDate>
    <dc:creator>maciep</dc:creator>
    <dc:date>2019-06-06T00:21:06Z</dc:date>
    <item>
      <title>Is it possible to use match in an initial search execution?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-use-match-in-an-initial-search-execution/m-p/405756#M117297</link>
      <description>&lt;P&gt;Hey guys&lt;/P&gt;

&lt;P&gt;So I would like to have a search select events from myindex based on what the user selects in a multiselect. &lt;/P&gt;

&lt;P&gt;One way that I can think to do this is to do:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex ("some raw string that option1 represents ending in a space " AND match($multiselect$,"option1")) OR ("some raw string that option2 represents not ending in a space" AND match($multiselect$,"option2"))  OR ("some raw string that option3 represents ending in a space " AND match($multiselect$,"option3"))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However this option does not work. You cannot do a match in the initial search execution, as far as I can tell.             &lt;CODE&gt;Is this correct?&lt;/CODE&gt; I tried just     &lt;CODE&gt;index=myindex AND match("asdf","asdf") | head 1&lt;/CODE&gt; and that doesn't work. I could                  &lt;CODE&gt;eval temp="$multiselect$"&lt;/CODE&gt; and then                  &lt;CODE&gt;match(temp,"option1")&lt;/CODE&gt; however that is not an elegant solution. I want to search for the strings during the initial search because that time complexity is exponentially better. Also I can't use valuePrefix/delimiter because the searched strings end in a white space per &lt;A href="https://answers.splunk.com/answers/750199/how-can-i-include-a-trailing-whitespace-in-a-multi.html"&gt;https://answers.splunk.com/answers/750199/how-can-i-include-a-trailing-whitespace-in-a-multi.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Thoughts?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 23:32:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-use-match-in-an-initial-search-execution/m-p/405756#M117297</guid>
      <dc:creator>nick405060</dc:creator>
      <dc:date>2019-06-05T23:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use match in an initial search execution?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-use-match-in-an-initial-search-execution/m-p/405757#M117298</link>
      <description>&lt;P&gt;if i add the space in the simple xml, it seems to honor it?  See the valueSuffix below.  When i went back to the gui, it kept the space.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="multiselect" token="field1"&amp;gt;
  &amp;lt;label&amp;gt;field1&amp;lt;/label&amp;gt;
  &amp;lt;choice value="some raw text option1"&amp;gt;option 1&amp;lt;/choice&amp;gt;
  &amp;lt;choice value="some raw text option 2"&amp;gt;option2&amp;lt;/choice&amp;gt;
  &amp;lt;prefix&amp;gt;(&amp;lt;/prefix&amp;gt;
  &amp;lt;suffix&amp;gt;)&amp;lt;/suffix&amp;gt;
  &amp;lt;valuePrefix&amp;gt;"&amp;lt;/valuePrefix&amp;gt;
  &amp;lt;valueSuffix&amp;gt; "&amp;lt;/valueSuffix&amp;gt;
  &amp;lt;delimiter&amp;gt; OR &amp;lt;/delimiter&amp;gt;
&amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Jun 2019 23:48:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-use-match-in-an-initial-search-execution/m-p/405757#M117298</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2019-06-05T23:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use match in an initial search execution?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-use-match-in-an-initial-search-execution/m-p/405758#M117299</link>
      <description>&lt;P&gt;but not every value ends in a space. so I can't just add the suffix for all.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 23:56:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-use-match-in-an-initial-search-execution/m-p/405758#M117299</guid>
      <dc:creator>nick405060</dc:creator>
      <dc:date>2019-06-05T23:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use match in an initial search execution?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-use-match-in-an-initial-search-execution/m-p/405759#M117300</link>
      <description>&lt;P&gt;ah...rtfm...got it.  &lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 00:21:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-use-match-in-an-initial-search-execution/m-p/405759#M117300</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2019-06-06T00:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use match in an initial search execution?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-use-match-in-an-initial-search-execution/m-p/405760#M117301</link>
      <description>&lt;P&gt;rtfm? there is zero in documentation about either question&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 00:40:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-use-match-in-an-initial-search-execution/m-p/405760#M117301</guid>
      <dc:creator>nick405060</dc:creator>
      <dc:date>2019-06-06T00:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use match in an initial search execution?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-use-match-in-an-initial-search-execution/m-p/405761#M117302</link>
      <description>&lt;P&gt;oh sorry, that was a reference to me not reading your question closely ("read the f'ing manual").&lt;/P&gt;

&lt;P&gt;how about including the quotes in the values instead of the prefix suffix?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   &amp;lt;input type="multiselect" token="field1"&amp;gt;
      &amp;lt;label&amp;gt;field1&amp;lt;/label&amp;gt;
      &amp;lt;choice value="&amp;amp;quot;some raw text option &amp;amp;quot;"&amp;gt;option 1&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="&amp;amp;quot;some raw text option&amp;amp;quot;"&amp;gt;option2&amp;lt;/choice&amp;gt;
      &amp;lt;prefix&amp;gt;(&amp;lt;/prefix&amp;gt;
      &amp;lt;suffix&amp;gt;)&amp;lt;/suffix&amp;gt;
      &amp;lt;valuePrefix&amp;gt;&amp;lt;/valuePrefix&amp;gt;
      &amp;lt;valueSuffix&amp;gt;&amp;lt;/valueSuffix&amp;gt;
      &amp;lt;delimiter&amp;gt; OR &amp;lt;/delimiter&amp;gt;
    &amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 06 Jun 2019 00:57:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-use-match-in-an-initial-search-execution/m-p/405761#M117302</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2019-06-06T00:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use match in an initial search execution?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-use-match-in-an-initial-search-execution/m-p/405762#M117303</link>
      <description>&lt;P&gt;o cool. will try tomorrow AM thx!!&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 01:04:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-use-match-in-an-initial-search-execution/m-p/405762#M117303</guid>
      <dc:creator>nick405060</dc:creator>
      <dc:date>2019-06-06T01:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to use match in an initial search execution?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-use-match-in-an-initial-search-execution/m-p/405763#M117304</link>
      <description>&lt;P&gt;Still dumps the white space.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2019 16:23:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-use-match-in-an-initial-search-execution/m-p/405763#M117304</guid>
      <dc:creator>nick405060</dc:creator>
      <dc:date>2019-06-10T16:23:44Z</dc:date>
    </item>
  </channel>
</rss>

