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

Supported Highlighting in Elasticsearch #1930

Merged

Conversation

SjSnowball
Copy link
Contributor

PR for Support Highlighting feature in Elasticsearch #1872

Proposed changes:
Added code to push the highlighted results to meta_data results

Status (please check what you already did):

  • First draft (up for discussions & feedback)
  • Final code
  • Added tests
  • Updated documentation

@bogdankostic
Copy link
Contributor

Hi @Sj-Snowball, thank you very much for your contribution! :)
@tstadel will have a look at it at the beginning of next year.

@bogdankostic bogdankostic linked an issue Dec 29, 2021 that may be closed by this pull request
Copy link
Member

@tstadel tstadel left a comment

Choose a reason for hiding this comment

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

Hey @SjSnowball,
cool to have your PR. I added some comments. Most of them are minor changes. However, I think we should copy over the whole "highlight" entry into our meta_data and add some remarks where you can find the highlights if you set a custom_query with highlighting to the ElasticsearchRetriever docstrings. To emphasize that this is not a normal meta_data field, we might call it "highlighted". But I leave that up to you as "highlight" might be more intuitive to most (elastic search) users.

haystack/document_stores/elasticsearch.py Outdated Show resolved Hide resolved
test/test_retriever.py Show resolved Hide resolved
test/test_retriever.py Outdated Show resolved Hide resolved
test/test_retriever.py Show resolved Hide resolved
test/test_retriever.py Outdated Show resolved Hide resolved
test/test_retriever.py Outdated Show resolved Hide resolved
@ZanSara
Copy link
Contributor

ZanSara commented Jan 20, 2022

Hello @Sj-Snowball, just checking if you will have time to work on this PR in the next days. If not, just let us know so we can apply the necessary changes and merge it before it gets too much out of sync with master 🙂

@CLAassistant
Copy link

CLAassistant commented Jan 20, 2022

CLA assistant check
All committers have signed the CLA.

@SjSnowball
Copy link
Contributor Author

@tstadel Have made the changes

@Timoeller
Copy link
Contributor

Hey @SjSnowball. Thanks for the contribution. Our contributor license bot identified it as a significant contribution for which we require a contributor license agreement. For more info on this please have a look at: https://github.com/deepset-ai/haystack/blob/master/CONTRIBUTING.md#contributor-licence-agreement-cla
Could you sign the CLA please before merging this improvement?

@tstadel
Copy link
Member

tstadel commented Jan 26, 2022

I just added a usage example to the ElasticsearchRetriever and ElasticsearchDocumentStore docstrings.

Copy link
Member

@tstadel tstadel left a comment

Choose a reason for hiding this comment

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

The changes look good to me, @SjSnowball. As soon as you sign the CLA we are good to merge :-)

@Timoeller
Copy link
Contributor

Timoeller commented Jan 26, 2022

Sorry, I can confirm that user "SjSnowball" has signed the CLA this morning. But the assistant is complaining about "Sj-Snowball" with a hyphen. And also this user created the commits.

Did you by any chance change your github name recently?
Edit: I found https://github.com/Sj-Snowball which you apparently used for creating initial commits.

Anyways, I made the assistant pass the check also for "Sj-Snowball". Lets re-trigger the check

@Timoeller
Copy link
Contributor

Ok ready to roll! :D

@Timoeller Timoeller merged commit c4fff19 into deepset-ai:master Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Highlighting feature in Elasticsearch
7 participants