mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-04 23:54:03 -04:00
Use the fast vector highlighter for highlighting search results
This commit is contained in:
@@ -115,7 +115,9 @@ func (b *Backend) Search(ctx context.Context, sir *searchService.SearchIndexRequ
|
||||
PreTags: []string{"<mark>"},
|
||||
PostTags: []string{"</mark>"},
|
||||
Fields: map[string]osu.BodyParamHighlight{
|
||||
"Content": {},
|
||||
"Content": {
|
||||
Type: "fvh",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -43,6 +43,7 @@ func (q QueryReqBody[O]) MarshalJSON() ([]byte, error) {
|
||||
type BodyParamHighlight struct {
|
||||
PreTags []string `json:"pre_tags,omitempty"`
|
||||
PostTags []string `json:"post_tags,omitempty"`
|
||||
Type string `json:"type,omitempty"`
|
||||
Fields map[string]BodyParamHighlight `json:"fields,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user