-
Notifications
You must be signed in to change notification settings - Fork 691
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HitReader supplies Hit trait not SearchHit #2374
Labels
Milestone
Comments
This is a good point. I'll make a change in the 8.0 release where I can change the API a bit. |
hmagrahi
pushed a commit
to hmagrahi/elastic4s
that referenced
this issue
Dec 11, 2023
sksamuel
added a commit
that referenced
this issue
Dec 14, 2023
Co-authored-by: Haikel magrahi <[email protected]> Co-authored-by: Sam <[email protected]>
Fixed in #2973. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: