On Mon, May 19, 2014 at 6:39 AM, mahesh rajamani
<rajamani.mah...@gmail.com>wrote:

> Sorry I just realized the table name in 2 schema are slightly different,
> but still i am not sure why i should not use same index name across
> different schema. Below is the instruction to reproduce.
>
>
> Created 2 keyspace using cassandra-cli
>
>
> [default@unknown] create keyspace keyspace1 with placement_strategy =
> 'org.apache.cassandra.locator.SimpleStrategy' and
> strategy_options={replication_factor:1};
>
> [default@unknown] create keyspace keyspace2 with placement_strategy =
> 'org.apache.cassandra.locator.SimpleStrategy' and
> strategy_options={replication_factor:1};
>
>
> Create table index using cqlsh as below:
>
>
> cqlsh> use keyspace1;
>
> cqlsh:keyspace1> CREATE TABLE table1 (version text, flag boolean, primary
> key (version));
>
> cqlsh:keyspace1> create index sversionindex on table1(flag);
>
> cqlsh:keyspace1> use keyspace2;
>
> cqlsh:keyspace2> CREATE TABLE table2 (version text, flag boolean, primary
> key (version));
>
> cqlsh:keyspace2> create index sversionindex on table2(flag);
>
> *Bad Request: Duplicate index name sversionindex*
>
>

Since index name is optional in the create index statement, you could just
omit it and let the system give it a unique name for you.

-Bryan

Reply via email to