title: Cassandra Delete by Secondary Index or By Allowing Filtering
body: <p>I’m trying to delete by a secondary index or column key in a table. I'm not concerned with performance as this will be an unusual query. Not sure if it’s possible? E.g.:</p>
  
  <pre><code>CREATE TABLE user_range (
    id int,
    name text,
    end int,
    start int,
    PRIMARY KEY (id, name)
  )
  </code></pre>
  
  <p>cqlsh> select * from dat.user_range where id=774516966;</p>
  
  <pre><code>id        | name      | end | start
  -----------+-----------+-----+-------
  774516966 |   0 - 499 | 499 |     0
  774516966 | 500 - 999 | 999 |   500
  </code></pre>
  
  <p>I can:</p>
  
  <pre><code>cqlsh&gt; select * from dat.user_range where name='1000 - 1999' allow filtering;
  
  id          | name        | end  | start
  -------------+-------------+------+-------
   -285617516 | 1000 - 1999 | 1999 |  1000
   -175835205 | 1000 - 1999 | 1999 |  1000
  -1314399347 | 1000 - 1999 | 1999 |  1000
  -1618174196 | 1000 - 1999 | 1999 |  1000
  Blah blah…
  </code></pre>
  
  <p>But I can’t delete:</p>
  
  <pre><code>cqlsh&gt; delete from dat.user_range where name='1000 - 1999' allow filtering;
  Bad Request: line 1:52 missing EOF at 'allow'
  cqlsh&gt; delete from dat.user_range where name='1000 - 1999';
  Bad Request: Missing mandatory PRIMARY KEY part id
  </code></pre>
  
  <p>Even if I create an index:</p>
  
  <pre><code>cqlsh&gt; create index on dat.user_range (start);
  cqlsh&gt; delete from dat.user_range where start=1000;
  Bad Request: Non PRIMARY KEY start found in where clause
  </code></pre>
  
  <p>Is it possible to delete without first knowing the primary key?</p>