Mongo upsert-like capability?

Uh… I think so. I’ll look at the docs a little more closely and try what you’re suggesting.

After my post I came up with a variation that does a check for the key then increments value if it exists or puts the entire record there if it doesn’t for now, which seems to be working. My main problem now is on the read path. When I try to query for the records by other bins, I’m getting AEROSPIKE_ERR_INDEX_NOT_FOUND when I can clearly see the secondary index on my namespace/set in AMC…

>>> query = as_client.query(AS_NS, AS_SET)
>>> query.select('value', 'ts')

>>> from aerospike import predicates as p
>>> query.where( p.equals('channel', "WEB") )

>>> def print_result((key, metadata, record)):
...   print (key, record)
...
>>> query.foreach( print_result)
Traceback (most recent call last):
  File "", line 1, in 
Exception: (201L, 'AEROSPIKE_ERR_INDEX_NOT_FOUND', 'src/main/aerospike/aerospike_query.c', 223)