title: Creating azure search service with DocumentDb as resource for service?
body: <p>I already set up DocumentDb and uploaded the documents to DocumentDb.</p>
  
  <p>My JSON documents have data nested upto 4 levels, eg:-</p>
  
  <pre><code>{
    id: '12345',
    properties:
    {
        Accessories:
        {
              watch:1,
              WristBands: [{
                    blue:1, 
                    red: 2}]
                    }
              }
    Name: Leo,
    Age: 24
  }
  </code></pre>
  
  <p>I want to use azure search service for able to search upto the last level(e.g. The count of wristband colour i.e. blue:1). I have setup the service as well.</p>
  
  <p>I want some help in creating the index and the indexer for such nested data in C# so that I can query the service.
  Already found, how to use DataType.Collection(DataType.String), but this supports till level 2.</p>
  
  <p>Classes can also be made for each sub-level but have no idea how to define them during indexing. Refered to example <a href="https://github.com/Azure-Samples/search-dotnet-getting-started" rel="nofollow">https://github.com/Azure-Samples/search-dotnet-getting-started</a> .</p>