I have a couchdb view set up using an array key value, in the format:
[articleId, -timestamp]
I want to query for all entries with the same art
First, as a comment pointed out, there is indeed a special value {}
that is ordered after any value, so your query becomes:
startkey=["target ID"]&endkey=["target ID",{}]
This is as equivalent to a wildcard match.
As a side note, there is no need to reverse the ordering in the map function by emitting a negative timestamp, you can reverse the order as an option to the view invocation (your start and end key will be swapped).
startkey=["target ID",{}]&endkey=["target ID"]&descending=true