You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've just started using elastic4s and I have an issue with supplying a HitReader[T] implicit to marshal responses to my domain types. The issue is that the HitReader[T] typeclass provides instances of trait Hit not SearchHit and I need to get the sort values, and Hit doesn't expose this, but SearchHit does.
What I did was simply cast Hit to SearchHit and grab the sort values I need, like so...
This works, but it seems like there should be a better way, should the sort values be exposed in the Hit trait? Or perhaps there is a better/preferred way to do this that I'm just not seeing?
I'm using release 7.9.2 as I'm on Elasticsearch 7.9 currently.
The text was updated successfully, but these errors were encountered:
I've just started using elastic4s and I have an issue with supplying a
HitReader[T]
implicit to marshal responses to my domain types. The issue is that theHitReader[T]
typeclass provides instances of traitHit
notSearchHit
and I need to get the sort values, andHit
doesn't expose this, butSearchHit
does.What I did was simply cast
Hit
toSearchHit
and grab the sort values I need, like so...This works, but it seems like there should be a better way, should the sort values be exposed in the
Hit
trait? Or perhaps there is a better/preferred way to do this that I'm just not seeing?I'm using release
7.9.2
as I'm on Elasticsearch7.9
currently.The text was updated successfully, but these errors were encountered: