title: .NET - c# - Cross partition query is required but disabled trouble on DocumentDB data access
body: <p>I have written the following code to fetch a record from the DocumentDB</p>
  
  <pre><code>private static void QueryDocuments1(DocumentClient client)
  {
  
      IQueryable&lt;SearchInput&gt; queryable =
  client.CreateDocumentQuery&lt;SearchInput&gt;(UriFactory.CreateDocumentCollectionUri(DocumentDBName, DocumentDBCollectionName))
          .Where(x =&gt; x.Receiver == "8907180");
      List&lt;SearchInput&gt; posts = queryable.ToList();
  }
  </code></pre>
  
  <p>And it is showing the following error on the code line <code>List&lt;SearchInput&gt; posts = queryable.ToList();</code></p>
  
  <blockquote>
    <p>{"Cross partition query is required but disabled. Please set
    x-ms-documentdb-query-enablecrosspartition to true, specify
    x-ms-documentdb-partitionkey, or revise your query to avoid this
    exception.\r\nActivityId: xxxxxx-xxxx-xxx-xxx-xxxxxxx"}</p>
  </blockquote>
  
  <p>Please help me on it...</p>