add an index with Java API using JSON