Skip to content

[Feature Request] Allow multiple highlights on one field #17506

Open
@christophegachet

Description

@christophegachet

Is your feature request related to a problem? Please describe

I would like to highlight several times the same field using different highlighter types in the same query.
Depending on the search terms, using different highlight algorithm could return more or less relevant highlighting.
I would be able to check the quality of the different highlight results and chose the better.
Today, it's not possible to define several highlights on the same field, only one is taken into account

Describe the solution you'd like

An expected proposal could be

"highlight": {
    "fields": [
      {
        "fulltext.fvh": {
          "number_of_fragments": 10,
          "type": "fvh",
           "matched_fields": [
            "fulltext"
          ]
        }
      },
      {
        "fulltext.unified": {
          "number_of_fragments": 10,
          "type": "unified",
          "matched_fields": [
            "fulltext"
          ]
        }
      }
    ]
  }

Related component

Search:Query Capabilities

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions