title: Titan cannot find suitable index while index exists
body: <p>I try to create a simple Titan graph system on Berkeley, and Titan does not use the index I've created for its queries.</p>
  
  <pre><code>String INDEX_NAME = "search"
  File dir=new File("C:/TEMP/titanTest1");
  dir.mkdirs();
  TitanFactory.Builder config = TitanFactory.build();
  config.set("storage.backend", "berkeleyje");
  config.set("storage.directory", dir.getAbsolutePath());
  config.set("index."+INDEX_NAME+".backend","elasticsearch");
  config.set("index." + INDEX_NAME + ".directory", new File(dir,"es").getAbsolutePath());
  config.set("index."+INDEX_NAME+".elasticsearch.local-mode",true);
  config.set("index."+INDEX_NAME+".elasticsearch.client-only",false);
  config.set("query.force-index",true);
  TitanGraph tg= config.open();
  try {
  
       if (tg.getPropertyKey("name")==null){
           TitanManagement mgmt = tg.getManagementSystem();
           VertexLabel metaclassLabel=mgmt.makeVertexLabel("metaclass").make();
  
           final PropertyKey name = mgmt.makePropertyKey("name").dataType(String.class).make();
           mgmt.buildIndex("metaClassesByName",Vertex.class).addKey(name).indexOnly(metaclassLabel).buildMixedIndex(INDEX_NAME);
  
           mgmt.commit();
       }
  
       System.out.println("indexed:"+tg.getIndexedKeys(Vertex.class));
  
       Vertex v=tg.addVertexWithLabel("metaclass");
       v.setProperty("name", "test");
  
       for (Object o:tg.query().has("name").has(ImplicitKey.LABEL.getName(), "metaclass").vertices()){
              Vertex v2=(Vertex)o;
              System.out.println(v2);
       }
       tg.commit()
  } finally {
      tg.shutdown();
  }
  </code></pre>
  
  <p>this code prints:</p>
  
  <pre><code> indexed:[name]
   Exception in thread "main" com.thinkaurelius.titan.core.TitanException: Could not find a suitable index to answer graph query and graph scans are disabled: [(name &lt;&gt; null AND label = metaclass)]:VERTEX
  at com.thinkaurelius.titan.graphdb.transaction.StandardTitanTx$8.execute(StandardTitanTx.java:1198)
  </code></pre>
  
  <p>I don't understand why Titan can't use the index I've defined. I want to list all objects that have the metaclass label. The only thing that works is to defined a composite index and search a vertex with an exact name value. Is it in anyway possible?</p>
  
  <p>Thanks!</p>