Indices - Searching by Bin Value


Postby SlavkoPar » Fri Feb 01, 2013 6:49 am

What is recommended way of searching by Bin value ? Do we have to use Scan and read all the records in cluster? I have seen the class ClAppendQueryFilter, how can we use it ?


Postby young » Fri Feb 01, 2013 3:15 pm

The class you are looking at was a specific feature built for one customer. You will not be able to use it with your build.

There are a few approaches to this:

Customers handle this today by scanning, but that is not a quick process. Some will use a separate namespace/set. This involves having the data in one namespace (or set) and what is in effect a secondary index in another one. Here is an example: let us say that your data is for user profiles, with a user_id as the primary key. However, you have many different external identifiers from different partners that you can map to the user_id. You could have a usermap that will have the external id as the primary key and the user_id as the value. If you need to look at the data from an external id, you use the usermap to get the user_id, then use the user_id to get the profile data. With the acquisition of Alchemy DB, we are introducing secondary indexes. This will accomplish what you are looking for without the need for a second set of data.