Details
Description
See http://www.couchbase.com/communities/q-and-a/python-sdk-bug-query-loooong-key
Create a view that generate an index with a long key, more than 151 chars. For example I have created the following documents:
{
|
"key": "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567899999",
|
"name": "tug"
|
}
|
I have created a view that use the key attribute
function (doc, meta) {
|
emit(doc.key);
|
}
|
Using this key in a query does not work:
#!/usr/bin/env python
|
from couchbase import Couchbase
|
from couchbase.views.params import UNSPEC, Query
|
cb = Couchbase.connect(bucket='default')
|
k = "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567899999",
|
|
rows = cb.query("test", "test", key=k)
|
|
for row in rows:
|
print "Key \"%s\". ID '%s'" % (row.key, row.docid)
|
I have tested in Java and REST and it is working