Details
Description
Gentlefolk,
The following method worked under Python Client SDK v1.0.0.
def by_timestamp_and_text_and_text(cb, timestamp, period):
q = Query()
q.stale = STALE_UPDATE_BEFORE
q.mapkey_range = [[timestamp, 'A', 'a'], [timestamp + period, q.STRING_RANGE_END, q.STRING_RANGE_END]]
q.inclusive_end = False
q.reduce = False
results = cb.query("a_design_document", "by_timestamp_and_text_and_text", include_docs=False, query=q)
return results
-
- by_timestamp_and_text_and_text()
It is looking for keys of the form: [(int)timestamp, (str)allCapsText, (str)text]
Using the Python client SDK v 1.1.0, it throws the following error:
HttpResult<RC=0x0, Value={'reason': 'invalid UTF-8 JSON: error,{9,"lexical error: invalid char in json text.\\n",\n <<"
{\\"keys\\":None}">>}', 'error': 'bad_request'}, HTTP=400
Here's the query string throwing the above:
reduce=false&endkey=%5B1381122000%2C%20%22%5Cu0fff%22%2C%20%22%5Cu0fff%22%5D&startkey=%5B1381118400%2C%20%22A%22%2C%20%22a%22%5D&stale=false&inclusive_end=false
Here it is URL decoded:
reduce=false&endkey=[1381122000, "\u0fff", "\u0fff"]&startkey=[1381118400, "A", "a"]&stale=false&inclusive_end=false
An important query in my app no longer functions. Any suggested work arounds?
Anon,
Andrew