<?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 Is it possible to do faceted search with Splunk, similarly to what we do with Solr? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-do-faceted-search-with-Splunk-similarly-to/m-p/145112#M40406</link>
    <description>&lt;P&gt;I'm new to Splunk and I have been searching for a way to do faceted search, similarly to what I have been doing with Solr. BUt no success so far. Hope you can give me a hand on this.&lt;/P&gt;

&lt;P&gt;Imagine I have the following data sample.&lt;/P&gt;

&lt;P&gt;PARAMETER01 | PARAMETER02 | PARAMETER03&lt;BR /&gt;
house | road | road&lt;BR /&gt;
car | tree | house&lt;BR /&gt;
road | car | car&lt;BR /&gt;
tree | car | house&lt;/P&gt;

&lt;P&gt;What I want to know is how many times a search matches a specific field. For instance, I want to be able to search for "house" and get the following results:&lt;/P&gt;

&lt;P&gt;PARAMETER01: 1&lt;BR /&gt;
PARAMETER02: 0&lt;BR /&gt;
PARAMETER03: 2&lt;/P&gt;

&lt;P&gt;Can I do this with Splunk?&lt;BR /&gt;
Thank you in advance.&lt;/P&gt;</description>
    <pubDate>Tue, 28 Jul 2015 11:26:46 GMT</pubDate>
    <dc:creator>bemantunes</dc:creator>
    <dc:date>2015-07-28T11:26:46Z</dc:date>
    <item>
      <title>Is it possible to do faceted search with Splunk, similarly to what we do with Solr?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-do-faceted-search-with-Splunk-similarly-to/m-p/145112#M40406</link>
      <description>&lt;P&gt;I'm new to Splunk and I have been searching for a way to do faceted search, similarly to what I have been doing with Solr. BUt no success so far. Hope you can give me a hand on this.&lt;/P&gt;

&lt;P&gt;Imagine I have the following data sample.&lt;/P&gt;

&lt;P&gt;PARAMETER01 | PARAMETER02 | PARAMETER03&lt;BR /&gt;
house | road | road&lt;BR /&gt;
car | tree | house&lt;BR /&gt;
road | car | car&lt;BR /&gt;
tree | car | house&lt;/P&gt;

&lt;P&gt;What I want to know is how many times a search matches a specific field. For instance, I want to be able to search for "house" and get the following results:&lt;/P&gt;

&lt;P&gt;PARAMETER01: 1&lt;BR /&gt;
PARAMETER02: 0&lt;BR /&gt;
PARAMETER03: 2&lt;/P&gt;

&lt;P&gt;Can I do this with Splunk?&lt;BR /&gt;
Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2015 11:26:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-do-faceted-search-with-Splunk-similarly-to/m-p/145112#M40406</guid>
      <dc:creator>bemantunes</dc:creator>
      <dc:date>2015-07-28T11:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to do faceted search with Splunk, similarly to what we do with Solr?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-do-faceted-search-with-Splunk-similarly-to/m-p/145113#M40407</link>
      <description>&lt;P&gt;You can do it as a one-off like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ... | stats count(eval(PARAMETER01="house")) AS PARAMETER01 count(eval(PARAMETER02="house")) AS PARAMETER02 count(eval(PARAMETER03="house")) AS PARAMETER03
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But you should probably convert this to a macro which you can call like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | `MyMacro("house")`
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Jul 2015 00:43:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-do-faceted-search-with-Splunk-similarly-to/m-p/145113#M40407</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-29T00:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to do faceted search with Splunk, similarly to what we do with Solr?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-do-faceted-search-with-Splunk-similarly-to/m-p/145114#M40408</link>
      <description>&lt;P&gt;Thanks woodcock!&lt;/P&gt;

&lt;P&gt;It worked like expected. I just changed it a little bit to be able to do a more robust search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | stats count(eval(searchmatch("PARAMETER01=*house*")) AS PARAMETER01 count(searchmatch("PARAMETER02=*house*")) AS PARAMETER02 count(searchmatch("PARAMETER03=*house*")) AS PARAMETER03
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Jul 2015 09:52:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-do-faceted-search-with-Splunk-similarly-to/m-p/145114#M40408</guid>
      <dc:creator>bemantunes</dc:creator>
      <dc:date>2015-07-29T09:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to do faceted search with Splunk, similarly to what we do with Solr?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-do-faceted-search-with-Splunk-similarly-to/m-p/145115#M40409</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;

&lt;P&gt;I found the solution provided to be very slow, especially when we have a considerable number of fields to search.&lt;/P&gt;

&lt;P&gt;Is there an alternative way to get the same results?&lt;BR /&gt;
Or is there any way to optimize the Splunk dataset to improve this kind of search?&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2015 11:17:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-do-faceted-search-with-Splunk-similarly-to/m-p/145115#M40409</guid>
      <dc:creator>bemantunes</dc:creator>
      <dc:date>2015-10-07T11:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to do faceted search with Splunk, similarly to what we do with Solr?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-do-faceted-search-with-Splunk-similarly-to/m-p/145116#M40410</link>
      <description>&lt;P&gt;Using &lt;CODE&gt;stats&lt;/CODE&gt; is the most efficient (quickest) way to do this kind of thing.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2015 12:40:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-to-do-faceted-search-with-Splunk-similarly-to/m-p/145116#M40410</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-10-07T12:40:42Z</dc:date>
    </item>
  </channel>
</rss>

