Azure / azure-cosmos-python

🚨🚨🚨This SDK is now maintained at https://github.com/Azure/azure-sdk-for-python 🚨🚨🚨
https://github.com/Azure/azure-sdk-for-python
MIT License
150 stars 141 forks source link

limit the number of items returned queryItems #146

Open PsidomPC opened 5 years ago

PsidomPC commented 5 years ago

How do I limit the number of items returned when using QueryItems? I've tried both maxItemCount and pageSize, both don't seem to work:

options = {}
options['enableCrossPartitionQuery'] = True
options['pageSize'] = 5        # also tried maxItemCount

self.app_cosmos_client.QueryItems(
    database_or_Container_link=collection_link,
    query=f"""
        SELECT * FROM c
      """,
      options=options
)
rajata07 commented 4 years ago

any updates on this? I have the same issue. maxItemCount does not work.