incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roshan Dawrani <>
Subject Re: cant seem to figure out secondary index definition
Date Sun, 06 Mar 2011 11:24:37 GMT

Sure. Here is a sample of how we define it at the end of cassandra.yaml.

In the keyspace MyApp, it defines a column family MyUser, that has secondary
indexes on 2 String columns - firstname, and lastname.

Does it help?

    - name: MyApp
      replication_factor: 1
        - name: MyUser
          compare_with: org.apache.cassandra.db.marshal.BytesType
            - name: firstname
              validator_class: UTF8Type
              index_type: KEYS
              index_name: FirstNameIdx
            - name: firstname
              validator_class: UTF8Type
              index_type: KEYS
              index_name: LastNameIdx


On Sun, Mar 6, 2011 at 4:34 PM, Jürgen Link <>wrote:

>  Hi Roshan,
> could you please post a small sample from your yaml file?
> As documentation of indexes is quite sparse, we're grateful for any working
> example.
> Cheers
> Jürgen
> Am 04.03.2011 19:27, schrieb Roshan Dawrani:
> On Fri, Mar 4, 2011 at 11:52 PM, Jürgen Link <>wrote:
>> Hi Jonathan,
>> as Roland is already out of office, I'd like to jump in.
>> Maybe this somehow got lost in the moddle of this thread, indexing works
>> fine in our "real" cassandra cluster.
>> For our test cases, we use an embedded cassandra instance, which is
>> configured via yaml.
>> In case indexes cannot be defined via yaml (for embedded instances), is
>> there a more preferred way to do so?
>  Sorry, I haven't followed the whole of this thread yet, but I just
> noticed this mail and would like to add that we also use embedded Cassandra
> instance for our dev / tests and out yaml has a number of indexes and they
> work just fine. We are on Cassandar 0.7.0.

View raw message