Skip to content
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

Expose highlight in Hit #366

Merged
merged 1 commit into from
Jul 2, 2019
Merged

Conversation

mwilliammyers
Copy link
Collaborator

I went ahead with option 1 just to be safe in case Elasticsearch returns different things... but I can change it and update this PR.

Closes #365


[highlighted]: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-highlighting.html
*/
pub fn into_highlight(&self) -> Option<Value> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this method? I think you could just call response.highlight().cloned() and get the same result.

@KodrAus
Copy link
Member

KodrAus commented Jun 30, 2019

Thanks for the PR @mwilliammyers!

I've just left one comment but otherwise this looks good to me. I'm currently refactoring the crate layouts to also fix up the build so am not too concerned about Travis here right now.

@KodrAus
Copy link
Member

KodrAus commented Jul 2, 2019

Hey @mwilliammyers 👋

I've got a big changeset to merge in #364 but don't want you to have to deal with rebasing. So I'm going to merge this one as-is and drop off the into_highlight method.

Thanks again for working on this and bearing with the rather ad-hoc state of this codebase!

@KodrAus KodrAus merged commit bec1166 into elastic-rs:master Jul 2, 2019
@mwilliammyers mwilliammyers deleted the feat/highlight branch July 2, 2019 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add highlight to Hit
2 participants