return new LocalUniqueIndex<T>("myIndex", "myWorkspace", db, converter, keySerializer, serializer);
}
@SuppressWarnings( "unchecked" )
protected <T> LocalDuplicateIndex<T> duplicateValueIndex( Class<T> valueType ) {
PropertyType type = PropertyType.discoverType(valueType);
Comparator<T> comparator = (Comparator<T>)type.getComparator();
ValueFactory<T> valueFactory = (ValueFactory<T>)context.getValueFactories().getValueFactory(type);
Converter<T> converter = IndexValues.converter(valueFactory);
Serializer<T> serializer = (Serializer<T>)serializers.serializerFor(type.getValueClass());
return new LocalDuplicateIndex<T>("myIndex", "myWorkspace", db, converter, serializer, comparator);
}