# Indexing and Querying Large Set

**URL:** <https://discuss.aerospike.com/t/indexing-and-querying-large-set/936>\
**Category:** Query & Indexing\
**Created:** [February 10, 2015, 2:34am UTC](https://discuss.aerospike.com/t/indexing-and-querying-large-set/936 "2015-02-10T02:34:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![isingh](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/isingh/32/145_2.png) [@isingh](https://discuss.aerospike.com/u/isingh)\
**Post date:** [February 10, 2015, 2:34am UTC](https://discuss.aerospike.com/t/indexing-and-querying-large-set/936/1 "2015-02-10T02:34:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rbotzer](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/rbotzer/32/2114_2.png) [@rbotzer](https://discuss.aerospike.com/u/rbotzer)\
**Post date:** [February 10, 2015, 3:58pm UTC](https://discuss.aerospike.com/t/indexing-and-querying-large-set/936/2 "2015-02-10T15:58:03Z")

</div>

Aloha.

Currently you can build a [secondary index](http://www.aerospike.com/docs/architecture/secondary-index.html) 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](http://www.aerospike.com/docs/guide/data-types.html).

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](https://github.com/aerospike/aerospike-common/blob/master/src/include/aerospike/as_bytes.h). 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.
