Reputation: 652
I'm using the pydocumentdb library to query document-db.
I get errors when trying to execute cross-partitions queries, which are... considering I use a primary key as partition-key... every query I do.
The error message mentions the parameter x-ms-documentdb-query-enablecrosspartition. Which is indeed a rest http header constant, but I don't find any way to add parameters to the headers neither in the document_client module.
Upvotes: 0
Views: 99
Reputation: 652
Finally found it :
client_documentDB = document_client.DocumentClient(
config['ENDPOINT'],
{
'masterKey': config['MASTERKEY']
}
)
client_documentDB.default_headers['x-ms-documentdb-query-enablecrosspartition'] = True
Upvotes: 1