title: Different unique and partition key in CosmosDB
body: <p>We are moving from MongoDB to CosmosDB. In MongoDB, we never created any partition key because everything was working fine . But in CosmosDB, because of effective use of RUs, we need to create partition keys.</p>
  
  <p>Now the problem is that we already have a compound unique key in our collection which we do not want to use as partition key (also I am not sure if compound partition key is possible in cosmosDB or not) because we do not search usually using this unique key but we use some other parameters. </p>
  
  <p>Is it somehow possible to create partition key which is different from unique key?</p>
  
  <p>I tried to do so but I always get error - </p>
  
  <pre><code>cannot create unique index over { abc : 1.0, xyz : 1.0} with shard key pattern { partitionKey : 1.0 }
  </code></pre>
  
  <p>I also tried to create partition key which is a subset of unique key but that also results in the same error.</p>
  
  <p>Is there a solution to this problem or someone knows a better approach?</p>