MCPcopy Create free account
hub / github.com/dnote/dnote / getFTSBodyExpression

Function getFTSBodyExpression

pkg/server/app/notes.go:176–182  ·  view source on GitHub ↗
(params *ftsParams)

Source from the content-addressed store, hash-verified

174}
175
176func getFTSBodyExpression(params *ftsParams) string {
177 if params != nil && params.HighlightAll {
178 return "highlight(notes_fts, 0, '<dnotehl>', '</dnotehl>') AS body"
179 }
180
181 return "snippet(notes_fts, 0, '<dnotehl>', '</dnotehl>', '...', 50) AS body"
182}
183
184func selectFTSFields(conn *gorm.DB, params *ftsParams) *gorm.DB {
185 bodyExpr := getFTSBodyExpression(params)

Callers 1

selectFTSFieldsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected