in cassandra when create custom index 'json_idx' have ability of dropping index using
drop index json_idx;
is there way of viewing content of index table ? (something select * from, show or desc)
thank you
the tool viewing raw sstables sstable2json found in c*/tools/bin
. can use follows (example inclusive of ks , cf creation / population):
cqlsh> create keyspace example replication = {'class': 'simplestrategy', 'replication_factor': 1 }; cqlsh> create table example.table1 (id timeuuid, data text, primary key(id)); cqlsh> create index table1_data_idx on example.table1 (data); cqlsh> insert example.table1 (id, data) values (now(), '1'); cqlsh> insert example.table1 (id, data) values (now(), '2'); cqlsh> insert example.table1 (id, data) values (now(), '3'); cqlsh> insert example.table1 (id, data) values (now(), '4'); $ ./bin/nodetool flush $ ./tools/bin/sstable2json data/data/example/table1-c6163220ede311e4b03c5950fe1805c6/.table1_data_idx/la-1-big-data.db [ {"key": "1", "cells": [["33a44ed0ede411e4b03c5950fe1805c6","",1430252510243205]]}, {"key": "2", "cells": [["34e189c0ede411e4b03c5950fe1805c6","",1430252512347428]]}, {"key": "3", "cells": [["362c5940ede411e4b03c5950fe1805c6","",1430252514515429]]}, {"key": "4", "cells": [["373c90c0ede411e4b03c5950fe1805c6","",1430252516299193]]} ]
the important part adding index cf in path sstable2json, path goes this:
<data_dir>/data/<ks>/<cf-uid>/<secondary-index>/<data-sstable>