If I'm following correct, this is a FieldType that generates a UUID regardless of the input value:
public Field createField(SchemaField field, String externalVal, float boost)
// We ignore the external value and have our own
return super.createField(field, UUID.randomUUID().toString(), boost);
What is a use case for that?
If you are looking for something like the sql auto increment, it might be a good candidate for the new fangled 'UpdateRequestProcessor' – this could check if the input document has a uniqueKey - if not, add one and add the new value to the response.