<?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 Pair-wise Comparison Across Values of Different Fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Pair-wise-Comparison-Across-Values-of-Different-Fields/m-p/310065#M163532</link>
    <description>&lt;P&gt;Splunk newbie here. What I'm trying to do is a pair-wise comparison across all of the values of two different fields, in order to find certain similarities. I already have an initial search which finds the events and values for these two fields, let's call them "foo" and "bar", but the pair-wise comparison aspect is eluding me so far.&lt;/P&gt;

&lt;P&gt;Some more info:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Both "foo" and "bar" are regular/non-multi value fields&lt;/LI&gt;
&lt;LI&gt;"Foo" and "bar" are mutually exclusive - an event can have one or the other, but not both&lt;/LI&gt;
&lt;LI&gt;"Foo" and "bar" both contain string values&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;More precisely, what I need to go is generate all of the combinations between the values of these two fields, so that I can do the comparison across them. For instance, if "foo" has values of "A" and "B", and "bar" has values of "C" and "D", I would need to compare "A" and "C", "A" and "D", "B" and "C", etc.&lt;/P&gt;

&lt;P&gt;So theoretically my search would look something like:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;initial_search|pairwise_comparison_stuff|where foo LIKE bar&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I feel like this should be possible using &lt;CODE&gt;streamstats&lt;/CODE&gt; or something of the like, but any help would be appreciated!&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jan 2018 21:38:34 GMT</pubDate>
    <dc:creator>ikiril01</dc:creator>
    <dc:date>2018-01-17T21:38:34Z</dc:date>
    <item>
      <title>Pair-wise Comparison Across Values of Different Fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Pair-wise-Comparison-Across-Values-of-Different-Fields/m-p/310065#M163532</link>
      <description>&lt;P&gt;Splunk newbie here. What I'm trying to do is a pair-wise comparison across all of the values of two different fields, in order to find certain similarities. I already have an initial search which finds the events and values for these two fields, let's call them "foo" and "bar", but the pair-wise comparison aspect is eluding me so far.&lt;/P&gt;

&lt;P&gt;Some more info:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Both "foo" and "bar" are regular/non-multi value fields&lt;/LI&gt;
&lt;LI&gt;"Foo" and "bar" are mutually exclusive - an event can have one or the other, but not both&lt;/LI&gt;
&lt;LI&gt;"Foo" and "bar" both contain string values&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;More precisely, what I need to go is generate all of the combinations between the values of these two fields, so that I can do the comparison across them. For instance, if "foo" has values of "A" and "B", and "bar" has values of "C" and "D", I would need to compare "A" and "C", "A" and "D", "B" and "C", etc.&lt;/P&gt;

&lt;P&gt;So theoretically my search would look something like:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;initial_search|pairwise_comparison_stuff|where foo LIKE bar&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I feel like this should be possible using &lt;CODE&gt;streamstats&lt;/CODE&gt; or something of the like, but any help would be appreciated!&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 21:38:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Pair-wise-Comparison-Across-Values-of-Different-Fields/m-p/310065#M163532</guid>
      <dc:creator>ikiril01</dc:creator>
      <dc:date>2018-01-17T21:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: Pair-wise Comparison Across Values of Different Fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Pair-wise-Comparison-Across-Values-of-Different-Fields/m-p/310066#M163533</link>
      <description>&lt;P&gt;Update: I was able to generate my pair-wise comparison and get things working through &lt;CODE&gt;map&lt;/CODE&gt;. However, I did find some weirdness in how &lt;CODE&gt;map&lt;/CODE&gt;'s &lt;CODE&gt;search&lt;/CODE&gt; parameter handles &lt;CODE&gt;rex&lt;/CODE&gt; expressions, which took quite a bit of debugging and testing to resolve. I'll probably submit a separate question/issue for that.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 18:12:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Pair-wise-Comparison-Across-Values-of-Different-Fields/m-p/310066#M163533</guid>
      <dc:creator>ikiril01</dc:creator>
      <dc:date>2018-01-22T18:12:19Z</dc:date>
    </item>
  </channel>
</rss>

