I would very much like to see the ability to externalise identifiers from the entities being persisted in a compass index. For example:
This would be an alternative to the ID field(s) being mapped to a property of the object being persisted.
The use case would be in situations where the identifiers are not a property of the objects, either because the class model is a legacy model which does not contain the identifiers, or because the class model contains only naturals keys, and we want to use surrogate keys instead.
Under the covers, this wouldn't seem to be a big change to how Compass works. The ID would be stored as a lucene field, as it is now, but wouldn't be reconsituted back into the object when retrieve from the index.