Hi,

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?

----------------------------------------------------------------------------------------------------------------------
keyspaces:
    - name: MyApp
      replica_placement_strategy:
org.apache.cassandra.locator.SimpleStrategy
      replication_factor: 1
      column_families:
        - name: MyUser
          compare_with: org.apache.cassandra.db.marshal.BytesType
          column_metadata:
            - name: firstname
              validator_class: UTF8Type
              index_type: KEYS
              index_name: FirstNameIdx
            - name: firstname
              validator_class: UTF8Type
              index_type: KEYS
              index_name: LastNameIdx
----------------------------------------------------------------------------------------------------------------------

Regards,
Roshan

On Sun, Mar 6, 2011 at 4:34 PM, Jürgen Link <juergen.l...@googlemail.com>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 
> <juergen.l...@googlemail.com>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.
>
>
>
>

Reply via email to