Abschluss Bandsuche

This commit is contained in:
Simon Martens
2025-02-27 13:02:23 +01:00
parent 57f95122c8
commit d2e7f91c92
11 changed files with 330 additions and 195 deletions

View File

@@ -43,14 +43,13 @@ func BasicSearchSeries(app core.App, query string) ([]*Series, []*Series, error)
// INFO: Needing to differentiate matches
querysplit := NormalizeQuery(query)
if len(querysplit) == 0 {
req := IntoQueryRequests([]string{SERIES_TITLE_FIELD, ANNOTATION_FIELD, REFERENCES_FIELD}, querysplit)
if len(req) == 0 {
return series, []*Series{}, nil
}
altids, err := FTS5Search(app, SERIES_TABLE, FTS5QueryRequest{
Fields: []string{SERIES_TITLE_FIELD, ANNOTATION_FIELD, REFERENCES_FIELD},
Query: querysplit,
})
altids, err := FTS5Search(app, SERIES_TABLE, req...)
if err != nil {
return nil, nil, err
}