Easy-Es Easy-Es
💋Home
  • v2.0.0(current version)
  • What's New

    • What' s New In Easy-Es v2.0.0?
  • history version

    • v1.x.x
  • Upgrade guide

    • Upgrade to 2.x.x instructions
💖Support
  • OS Community
  • Recommend Goods
  • Project PPT (opens new window)
  • Project introduction
  • Project members
  • PR
Join
Customer
  • Doc-Apis (opens new window)
  • Fitness plan automatic generation system (opens new window)
  • Vuepress-theme-vdoing (opens new window)
  • Gitee (opens new window)
  • Github (opens new window)
  • 简体中文 (opens new window)
  • English (opens new window)

adv display by random ❤️become sponsor
💋Home
  • v2.0.0(current version)
  • What's New

    • What' s New In Easy-Es v2.0.0?
  • history version

    • v1.x.x
  • Upgrade guide

    • Upgrade to 2.x.x instructions
💖Support
  • OS Community
  • Recommend Goods
  • Project PPT (opens new window)
  • Project introduction
  • Project members
  • PR
Join
Customer
  • Doc-Apis (opens new window)
  • Fitness plan automatic generation system (opens new window)
  • Vuepress-theme-vdoing (opens new window)
  • Gitee (opens new window)
  • Github (opens new window)
  • 简体中文 (opens new window)
  • English (opens new window)
  • Quick start

    • Introduction
    • Applicable scene
    • Worry free
    • Avoid pit
    • Quick start
    • Springboot demo
    • Config
    • Annotation
  • Core functions

    • Auto process index
    • CRUD
    • Condition constructor
  • Extended function

    • Mixed query
    • Origin query
    • Page
    • Nested
    • Join Parent child
    • Get DSL
  • High-level syntax

    • Field filtering
    • Sort
    • Aggregation
    • Match
    • Weight
    • Highlight
      • Annotation usage example
    • Geo
  • Plugin

    • Plugin
  • Other

    • Faq
    • Difference from MP
    • MySQL and EE syntax comparison
    • Update log
    • Update plan
    • Copyright
    • Thanks
  • v1.xDoc
  • High-level syntax
LaoHan
2023-03-18
目录

Highlight

Tips

Highlighting fields can be achieved by custom annotation @HighLight, which can be added to the fields that need to be highlighted

# Annotation usage example

public class Document{
    /**
     * Fields that need to be highlighted
     */
    @HighLight
    private String content;
    // Omit other extraneous fields...
}
1
2
3
4
5
6
7
8

Tips

If you do not want the original field value to be overwritten by the highlighted field, then you need to specify the mappingField in the @HighLight annotation and add the field to the corresponding entity class. After this configuration, the highlighted content is returned in the highlightContent field, and the original content The value of the field still returns its own value.

E.g:

public class Document{
    /**
     * Fields that need to be highlighted
     */
    @HighLight(mappingField = "highlightContent")
    private String content;
    /**
     * Highlight the field whose return value is mapped
     */
    private String highlightContent;
    // Omit other extraneous fields...
}
1
2
3
4
5
6
7
8
9
10
11
12

Others

  • The highlight annotation supports setting the length fragmentSize of the content intercepted by the highlight return, the default value is 100
  • Highlight annotation supports setting the label of highlighted content, the default is em
Help us improve this document (opens new window)
Last update: 2024/03/29
Weight
Geo

← Weight Geo→

Theme by Vdoing | Copyright © 2021-2025 LaoHan | Zhejiang ICP No. 2022020479 | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式