-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unified Highlighter to support matched_fields (#107640)
Add support to the Unified 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".
- Loading branch information
1 parent
a2c947e
commit 2337eb0
Showing
9 changed files
with
723 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pr: 107640 | ||
summary: "Unified Highlighter to support matched_fields " | ||
area: Highlighting | ||
type: enhancement | ||
issues: | ||
- 5172 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
docs/reference/tab-widgets/highlighting-multi-fields-widget.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
++++ | ||
<div class="tabs" data-tab-group="highligther"> | ||
<div role="tablist" aria-label="Highlighting based on multi fields"> | ||
<button role="tab" | ||
aria-selected="true" | ||
aria-controls="unified-tab" | ||
id="unified-highlighter"> | ||
Unified | ||
</button> | ||
<button role="tab" | ||
aria-selected="false" | ||
aria-controls="fvh-tab" | ||
id="fvh-highlighter" | ||
tabindex="-1"> | ||
FVH | ||
</button> | ||
</div> | ||
<div tabindex="0" | ||
role="tabpanel" | ||
id="unified-tab" | ||
aria-labelledby="unified-highlighter"> | ||
++++ | ||
|
||
include::highlighting-multi-fields.asciidoc[tag=unified] | ||
|
||
++++ | ||
</div> | ||
<div tabindex="0" | ||
role="tabpanel" | ||
id="fvh-tab" | ||
aria-labelledby="fvh-highlighter" | ||
hidden=""> | ||
++++ | ||
|
||
include::highlighting-multi-fields.asciidoc[tag=fvh] | ||
|
||
++++ | ||
</div> | ||
</div> | ||
++++ |
Oops, something went wrong.