Set up Redis for duplicate identification
<p>I would like to use a Redis instance in order to identify duplicate records. </p>

<p>Any record can be identified by two features, the first feature is a hash of a string. The second feature is an array of hashes. So a new record is considered to be a duplicate if there is a match for its string hash or if any element in the array of hashes exists in another array of other element.</p>

<p>Example:</p>

<p>Record 1: 
<code>Id: 1, feature 1: ABC, feature 2: [aa,bb,cc]</code></p>

<p>Record 2:
<code>Id 2, feature 1: ABC, feature 2: []</code> <code>---&gt;</code> duplicate with record 1</p>

<p>Record 3:
<code>Id 3, feature 1: DDA, feature 2: [ff,bd,aa]</code> <code>--&gt;</code> duplicate with record 1 (match on <code>aa</code>)</p>

<p>I am wondering how i can use Redis in its most efficient manner to be able to perform such operations.</p>

<p>Thanks</p>