title: Create an index on a vertex property that already exists in Titan (Cassandra)?
body: <p>I am using Titan Server (Cassandra) v 0.3.1. I'd like to create an index on a vertex key/property that I have already started to use.  However, in their <a href="https://github.com/thinkaurelius/titan/wiki/Titan-Limitations#key-index-must-be-created-prior-to-key-being-used" rel="noreferrer">documentation</a>, Titan explains that:</p>
  
  <blockquote>
    <p>To index vertices by key, the respective key index must be created
    before the key is first used in a vertex property.</p>
  </blockquote>
  
  <p>If I try to create an index on a field that already exists, I see an error as expected:</p>
  
  <pre><code>gremlin&gt; g.createKeyIndex("my_key",Vertex.class)
  Cannot add an index to an already existing property key: my_key
  </code></pre>
  
  <p>However, even if I try to clear out the graph by removing all vertices &amp; edges, I see the same error:</p>
  
  <pre><code>gremlin&gt; g.E.remove()
  ==&gt;null
  gremlin&gt; g.V.remove()
  ==&gt;null
  gremlin&gt; g.createKeyIndex("my_key",Vertex.class)
  Cannot add an index to an already existing property key: my_key
  </code></pre>
  
  <p>So it seems that <code>my_key</code> persists in the underlying data store even after all of the graph elements are removed.  This is consistent with the docs (even though elements have been deleted the property has already been 'first used'), but seemed worth a shot.</p>
  
  <p>My next step is going to be to re-create a new Cassandra data store altogether, but I'm wondering if there is a better option.  </p>
  
  <p>What is the easiest way to create an index on a field that has already been used in Titan?</p>