mirror of
https://github.com/PeernetOfficial/core.git
synced 2026-07-22 12:47:51 +01:00
Search: Check if search index is available in main functions.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user