@cihangirb
My view definition is very simple:
function (doc, meta) {
if (doc.type == 'email') {
if (doc.sent == 'no') {
emit(meta.id, doc.username);
}
}
}
In development when I run the view in development time subset I see no results: screenshot here
Results show up in full cluster dataset: screenshot 2 here
Results also show up using the GUI in production: screenshot 3 here
I’m not sure why they are not showing up in dev under development time subset (they used to).
Lastly, when querying the view using the Python SDK these are my results.
-
when querying the beer-sample bucket things are good. I am able to iterate through the resiter and print out rows.
bkt = Bucket(‘couchbase://dev.couchbase.*****.com/beer-sample’)
resiter = bkt.query(‘beer’, ‘by_name’)
for row in resiter:
print row
-
when i change the bucket from beer-sample to ours, using the below code i get the below mentioned error:
Code:
print cb.get('loginAttempt::user::15').value
resiter = cb.query('wheepl', 'all_unsent_email')
for row in resiter:
print row
Error:
Traceback (most recent call last):
File "test.py", line 19, in <module>
for row in resiter:
File "/usr/local/lib/python2.7/dist-packages/couchbase/views/iterator.py", line 375, in __iter__
raw_rows = self.raw.fetch(self._mres)
couchbase.exceptions.HTTPError: <RC=0x3B[HTTP Operation failed. Inspect status code for details],HTTP Request failed. Examine 'objextra' for full result, Results=1, C Source=(src/http.c,140), OBJ=ViewResult<RC=0x3B[HTTP Operation failed. Inspect status code for details], Value=None, HTTP=404>>
It does print the ‘loginAttempt::user::15’ document - I did that to make sure the connection was setup right. I did double check the view name - it is called ‘all_unsent_email’.
I’m not sure what I’m doing wrong 
This was working before I started trying to use XDCR to and the elasticsearch connector.
Thank you!