<?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 you enforce a lookup match for all values of a multivalue field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-enforce-a-lookup-match-for-all-values-of-a-multivalue/m-p/444995#M126206</link>
    <description>&lt;P&gt;You cannot directly but you can easily adjust your situation to make it work.  First fix your lookup with this search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|inputlookup YourLookupHere
| stats values(kvstorefieldA) AS kvstorefieldA BY Your Other Field Names Here
| nomv kvstorefieldA
| outputlookup YourLookupHere
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now adjust your search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your Search Stuff
| eval kvstorefieldA=mvdedup(mvsort(kvstorefieldA))
| nomv kvstorefieldA
| lookup YourLookupHere kvstorefieldA
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The &lt;CODE&gt;nomv&lt;/CODE&gt; command flattens the mulit-valued field into a space-delimited single-value field.&lt;/P&gt;</description>
    <pubDate>Wed, 13 Feb 2019 20:15:59 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2019-02-13T20:15:59Z</dc:date>
    <item>
      <title>How do you enforce a lookup match for all values of a multivalue field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-enforce-a-lookup-match-for-all-values-of-a-multivalue/m-p/444994#M126205</link>
      <description>&lt;P&gt;I have a multivalue field in my events and I want to do a lookup against a multivalue field in kvstore field. Event field can either have all values of kvstore mv field or a subset of it. Existing lookup command matches at least one of the values. I want to enforce a match only if all values are present in the kvstore field.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;kvstorefieldA
A1 A2 A3
B1 B2 B3 B4 B5

event fieldX
A1 A2 A3
A1 A4
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How can I enforce that only the first value of fieldX matches and the second does not?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2019 23:04:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-enforce-a-lookup-match-for-all-values-of-a-multivalue/m-p/444994#M126205</guid>
      <dc:creator>Murali2888</dc:creator>
      <dc:date>2019-02-04T23:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do you enforce a lookup match for all values of a multivalue field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-enforce-a-lookup-match-for-all-values-of-a-multivalue/m-p/444995#M126206</link>
      <description>&lt;P&gt;You cannot directly but you can easily adjust your situation to make it work.  First fix your lookup with this search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|inputlookup YourLookupHere
| stats values(kvstorefieldA) AS kvstorefieldA BY Your Other Field Names Here
| nomv kvstorefieldA
| outputlookup YourLookupHere
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now adjust your search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your Search Stuff
| eval kvstorefieldA=mvdedup(mvsort(kvstorefieldA))
| nomv kvstorefieldA
| lookup YourLookupHere kvstorefieldA
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The &lt;CODE&gt;nomv&lt;/CODE&gt; command flattens the mulit-valued field into a space-delimited single-value field.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2019 20:15:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-enforce-a-lookup-match-for-all-values-of-a-multivalue/m-p/444995#M126206</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-02-13T20:15:59Z</dc:date>
    </item>
  </channel>
</rss>

