I'm inclined to reject this issue as we shouldn't allow overrides of the default mapping of document ids. You're all ok with that resolution?
Agreed. The problems lies more in the fact that we use field bridges for ID mapping even though they were not originally intended for that, and that as a result the bridge used for ID mapping can have side effects (like, add search fields). I already split the two concepts in the prototype for Search 6, by the way: https://github.com/yrodiere/hibernate-search-6-poc/blob/master/integration-test/src/test/java/org/hibernate/search/v6poc/PojoElasticsearchIT.java#L93. The thing used for identifiers used a separate interface (called IdentifierBridge at the moment, but we might revisit that if we find a better name). |