Add html to the highlight document in elasticsearch

This commit is contained in:
Hongbo Wu 2023-03-14 15:20:09 +08:00
parent 30fb1af9fa
commit bf6ae38fe1
2 changed files with 6 additions and 1 deletions

View file

@ -1,6 +1,6 @@
// Define the type of the body for the Search request
import { PickTuple } from '../util'
import { PubsubClient } from '../datalayer/pubsub'
import { PickTuple } from '../util'
import {
DateFilter,
FieldFilter,
@ -210,6 +210,7 @@ export interface Highlight {
labels?: Label[]
highlightPositionPercent?: number | null
highlightPositionAnchorIndex?: number | null
html?: string | null
}
export interface RecommendingUser {

View file

@ -123,6 +123,10 @@
},
"highlightPositionAnchorIndex": {
"type": "integer"
},
"html": {
"type": "text",
"analyzer": "strip_html_analyzer"
}
}
},