title: Cassandra Delete Records
body: <p>I'm new to Cassandra and I've been having some issues trying to delete records. I have a table defined as follows:</p>
  
  <pre><code>CREATE TABLE wire_journal (
      persistence_id text,
      partition_nr bigint,
      sequence_nr bigint,
      timestamp timeuuid,
      timebucket text,
      event blob,
      event_manifest text,
      message blob,
      ser_id int,
      ser_manifest text,
      tag1 text,
      tag2 text,
      tag3 text,
      used boolean static,
      writer_uuid text,
      PRIMARY KEY ((persistence_id, partition_nr), sequence_nr, timestamp, timebucket)
  ) WITH CLUSTERING ORDER BY (sequence_nr ASC, timestamp ASC, timebucket ASC)
      AND bloom_filter_fp_chance = 0.01
      AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
      AND comment = ''
      AND compaction = {'bucket_high': '1.5', 'bucket_low': '0.5', 'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'enabled': 'true', 'max_threshold': '32', 'min_sstable_size': '50', 'min_threshold': '4', 'tombstone_compaction_interval': '86400', 'tombstone_threshold': '0.2', 'unchecked_tombstone_compaction': 'false'}
      AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}
      AND crc_check_chance = 1.0
      AND dclocal_read_repair_chance = 0.1
      AND default_time_to_live = 0
      AND gc_grace_seconds = 864000
      AND max_index_interval = 2048
      AND memtable_flush_period_in_ms = 0
      AND min_index_interval = 128
      AND read_repair_chance = 0.0
      AND speculative_retry = '99PERCENTILE';
  </code></pre>
  
  <p>And Indexes defined as follows:</p>
  
  <pre><code>CREATE CUSTOM INDEX timestamp_idx ON wire_journal (timestamp) USING 'org.apache.cassandra.index.sasi.SASIIndex';
  CREATE CUSTOM INDEX manifest_idx ON wire_journal (event_manifest) USING 'org.apache.cassandra.index.sasi.SASIIndex';
  </code></pre>
  
  <p>I would like to be able to delete by timestamp and event_manifest.</p>
  
  <p>I can query by an event manifest for example:</p>
  
  <pre><code>select event_manifest, dateOf(timestamp) from wire_journal where event_manifest = '011000028';
  </code></pre>
  
  <p>The query above works. However If I try to do a deletion for the same criteria as follows: </p>
  
  <pre><code>delete from wire_journal where event_manifest = '011000028';
  </code></pre>
  
  <p>I get the following error:</p>
  
  <p>InvalidRequest: code=2200 [Invalid query] message="Some partition key parts are missing: persistence_id, partition_nr"</p>
  
  <p>I've tried including those columns in my delete as follows:</p>
  
  <pre><code>delete persistence_id, partition_nr from wire_journal where event_manifest = 'aba:011000028';
  </code></pre>
  
  <p>and I get the following error:</p>
  
  <p>invalidRequest: code=2200 [Invalid query] message="Invalid identifier persistence_id for deletion (should not be a PRIMARY KEY part)"</p>
  
  <p>How can I go about deleting all the records that match that condition?</p>