Indexing and Querying Large Set

Hey

Is it possible to query a large set using the python library? I would like to store a set in a bin, and want to query it. So far I can only get a bin value to work.

Aloha.

Currently you can build a secondary index for the purpose of performing queries on a bin with string or integer values. We are actively working on being able to index list and map, which are the aerospike types matching list and dictionary on the python side. See: Data Types.

That said, Set is a type that does not cast into a native type of the server, and therefore it will (starting release 1.0.38) be serialized and stored as bytes with type AS_BYTES_PYTHON. Meaning, Sets will not be searchable in the foreseeable future. If you use a dictionary instead (which basically is what they’re built over) with the {'mykey: True} approach, then it should work for you.