Apparently we have no mapping solution for composite key cases as described at:
I think that's a major use case and we should definitely provide a solution.
I'm pretty sure that I did such mappings in the past and don't remember what kind of workaround I might have used - that was a long time ago and it might not be possible anymore - or if it is, we should document the strategy.
Any feedback/workaround for this issue? I'm hitting it and I can't switch to EmbeddedId, and @DocumentId on a getter throws:
the general problem is that the indexing system requires a single term to unequivocally identify the entity.
So if in the database your composite id is made of two strings (for example), you need to be able to provide a bridge which transforms the pair into a keyword; Unfortunately not knowing what you might store in strings it is not safe for Hibernate Search to do this mapping automatically.
The @DocumentId strategy should work, could you describe your error, or even better provide a full example?