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

Add support for combining fields to the unified highlighter (matched_fields) #5172

Closed
nik9000 opened this issue Feb 18, 2014 · 8 comments
Closed
Labels
>enhancement high hanging fruit :Search Relevance/Highlighting How a query matched a document Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch

Comments

@nik9000
Copy link
Member

nik9000 commented Feb 18, 2014

Like the FVH can combine fields, it'd be nice to be able to combine fields in the postings highlighter. See #3750 for the FVH. See https://issues.apache.org/jira/browse/LUCENE-4652 for the Lucene twin.

@nik9000
Copy link
Member Author

nik9000 commented Mar 31, 2014

Abandoning in favor of getting this Elasticsearch plugin released which has this: https://github.com/nik9000/expiremental-highlighter

@nik9000 nik9000 closed this as completed Mar 31, 2014
@ajhalani
Copy link

So the lucene ticket mentioned is resolved, does this mean it can be exposed in ElasticSearch as well without the need of the "experiemental-highlighter" plugin ? Would be nice :)

@clintongormley clintongormley added the :Search Relevance/Highlighting How a query matched a document label Sep 11, 2014
@clintongormley
Copy link
Contributor

This should be doable now that we're using Lucene's postings highlighter instead of our own custom version.

@nik9000
Copy link
Member Author

nik9000 commented Jun 5, 2017

Now that we're dropping the postings highlighter in favor of the unified highlighter, I think this should be about the unified highlighter instead.

@nik9000 nik9000 changed the title Add support for combining fields to the postings highlighter (matched_fields) Add support for combining fields to the unified highlighter (matched_fields) Jun 5, 2017
@jimczi
Copy link
Contributor

jimczi commented Mar 22, 2018

cc @elastic/es-search-aggs

@rjernst rjernst added the Team:Search Meta label for search team label May 4, 2020
@joostPieterse
Copy link

I came across this issue when trying to find the right highlighter for our multifields. At the moment we use FVH and would want to switch to unified for its bm25 scoring, but I don't think we can without matched_fields being supported for unified.

I see this issue hasn't gotten much attention (any chance it's going to be picked up still?), but maybe someone can comment if one of the following approaches may work in a custom plugin:

  • Get offsets and scores from the unified highlighter so we can merge the snippets it produces for each multifield ourselves. Scores seem available, but I couldn't find offsets.

  • Add bm25 scoring to the FVH highlighter (somehow...)

@stefanobranco
Copy link

stefanobranco commented Mar 14, 2024

I know this has been around for quite a while so it's probably not the biggest priority, but with the full focus now apparently being on the unified highlighter, this has sort of risen up in priority for us since it means we either lose functionality we're currently using with the FVH or don't get the benefits of any improvements to the unified highlighter.

mayya-sharipova added a commit to mayya-sharipova/elasticsearch that referenced this issue Apr 18, 2024
Add support to the Uunified highlighter to combine matches on multiple fields
to highlight a single field: "matched_fields".

Based on Lucene PR: apache/lucene#13268

Lucene PR is based on the concept of masked fields where masked fields
are different from the original highlighted field. This PR in
Elasticsearch uses the already existing highlighter parameter
"matched_fields"

Closes elastic#5172
@mayya-sharipova
Copy link
Contributor

Addressed in PR #107640

@javanna javanna added Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch and removed Team:Search Meta label for search team labels Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement high hanging fruit :Search Relevance/Highlighting How a query matched a document Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch
Projects
None yet
Development

No branches or pull requests

9 participants