@Override
  public int compareTo(IndexKey o) {
    if (_name.equals(o._name)) {
      return _type.getId().compareTo(o._type.getId());
    }
    return _name.compareTo(o._name);
  }
@Test
  public void testCompareTo() {
    List<IndexKey> iks = Arrays
        .asList(new IndexKey("foo", StandardIndexes.inverted()), new IndexKey("bar", StandardIndexes.bloomFilter()),
            new IndexKey("foo", StandardIndexes.forward()), new IndexKey("bar", StandardIndexes.dictionary()),
            new IndexKey("baz", StandardIndexes.json()), new IndexKey("baz", StandardIndexes.fst()));
    Collections.sort(iks);
    assertEquals(iks, Arrays
        .asList(new IndexKey("bar", StandardIndexes.bloomFilter()), new IndexKey("bar", StandardIndexes.dictionary()),
            new IndexKey("baz", StandardIndexes.fst()), new IndexKey("baz", StandardIndexes.json()),
            new IndexKey("foo", StandardIndexes.forward()), new IndexKey("foo", StandardIndexes.inverted())));
  }