0

In one of my project, I'm using mongoengine 0.9 and pymongo 2.8 for the database and python django as a framework. I came through the view concept in mongodb and created a view in the database for a model named User. But I don't know how to access the view from mongodb using pymongo. Anyone have any suggestion, please help?

The error message I'm getting while trying to iterate over the cursor is:

database error: Namespace db.collection is a view. OP_GET_MORE operations are not supported on views. Only clients which support the getMore command can be used to query views.

Vijesh Venugopal
  • 1,621
  • 15
  • 26
  • Can you tell me what is the meaning of view here. What do you want from mongodb after this query. – Vaibhav Mishra Dec 11 '19 at 12:35
  • View mean it's kind of stored procedure we're using for NoSQL databases. The issue is like I created a view in mongodb and for getting data from the same, I'm using aggregate. By default, it is returning 101 documents and later it shows the error message I have added above. – Vijesh Venugopal Dec 11 '19 at 14:17

1 Answers1

0

MongoDB have feature called op codes in your case that is OP_GET_MORE to communicate with the db. Overtime some of these have been replaced and in your case client is not supporting getMore command. Please check your version.

Vaibhav Mishra
  • 227
  • 2
  • 11