Skip to content

Highlight Support in PPL #916

Closed as not planned
Closed as not planned

Description

@forestmvey

Is your feature request related to a problem?
Highlight in the SQL plugin is currently supported in SQL but not PPL. What is the front-end use-case for highlight in PPL?

What solution would you like?
Potential implementations include:

Highlight as a function argument to all relevance-based search functions
e.g.
match("message", "access denied", "highlight"="*")
or
multi_match(["message", "status"], "access denied", "highlight"=["message"])

Splunk-like command for highlight without fields
e.g.
highlight "access denied"
which is equivalent to
match("", "access denied", "highlight"=["*"])

Splunk-like command for highlight with fields
e.g.
highlight "access denied" fields=("message", "status")

Highlight as a function in the fields command (breaking change, 3.x only)
e.g.
... | fields highlight("*")

What alternatives have you considered?
We have not considered alternatives past those listed above. Input is welcome from anyone!

Additional context?
Highlight as a function in the fields command has an implementation ready for a PR here.
Demo video for highlight as a function in the fields command can be found here.

Activity

  1. added
    enhancement
    on Oct 13, 2022
  2. forestmvey commented on Oct 13, 2022

    @forestmvey
    CollaboratorAuthor

    A PPL query without a fields command returns all fields by default. If highlight is NOT implemented as a function in the fields command, what would be the expected output.

    highlight used without a fields command:

    • All fields are returned plus the added highlight field(s)?

    If an end-user wants to return only the highlight field(s), how would they accomplish this and what would be specified in the fields command. The eval command accomplishes this by creating an additional field which can be specified in the fields command. The end-user interaction with the fields command is relevant in both the Relevance Query and Splunk-like Command syntax options.

  3. added
    PPL
    on Dec 14, 2022
  4. moved this from Not Started to Won't do in PPL Trackeron Aug 11, 2025
  5. moved this from Won't do to Done in PPL Trackeron Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    PPLenhancement

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions