title: How to add distinct values in a multivalue field in solr
body: <p>I have a multivalue field called category(which is also a store field) in which i need to add only distinct values</p>
  
  <p><code>&lt;field name="category"&gt;value1&lt;/field&gt;</code><br/>
  <code>&lt;field name="category"&gt;value2&lt;/field&gt;</code></p>
  
  <p>If I do a update as follows<br/>
  <code>&lt;add&gt;</code><br/>
  <code>&lt;doc&gt;</code><br/>
  <code>&lt;field name="id"&gt;E02&lt;/field&gt;</code><br/>
  <code>&lt;field name="category" update="add"&gt;value2&lt;/field&gt;</code><br/>
  <code>&lt;/doc&gt;</code><br/>
  <code>&lt;/add&gt;</code><br/></p>
  
  <p>I get the value2 stored twice <br/>
  <code>&lt;field name="category"&gt;value1&lt;/field&gt;</code><br/>
  <code>&lt;field name="category"&gt;value2&lt;/field&gt;</code><br/>
  <code>&lt;field name="category"&gt;value2&lt;/field&gt;</code></p>
  
  <p>I need to store/update only disctinct values in category fields which is a multivalue fields. How to do this solr?</p>
  
  <p>Thanks in advance,
  Jagadesh.</p>