Search: Check if search index is available in main functions.

This commit is contained in:
Kleissner
2022-01-03 00:15:20 +01:00
parent 10d39595f6
commit 8aee4b16f9
2 changed files with 20 additions and 6 deletions

View File

@@ -11,6 +11,10 @@ import (
)
func (index *SearchIndexStore) Search(term string) (results []SearchIndexRecord) {
if index == nil { // Search index may not be available.
return nil
}
termS, isExact, _ := sanitizeInputTerm(term)
if len(termS) < wordMinLength {