Is there any nicer way to have faceting on ids of embedded collection aside from introducing a @Transient method that proxies calls to getId in a superclass solely for indexing purposes?
To be honest, I am not 100% I understand your current workaround. If you like post the full entities here. There might be another workaround, but whether it works depends on what you want to do. As mentioned, the problem is related to the fact that numbers are per default numerically encoded. You can force a string encoding like this: @Facet(encoding = FacetEncodingType.STRING). However, there is a caveat. String encoded fields can only be targeted with a discrete facet request (aka counting of facet values). If you need range faceting you need to have numeric encoding. So it comes down to the actual facet request you want to use.
|