mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-10-27 19:53:41 +08:00
21 lines
475 B
Go
21 lines
475 B
Go
package plg_search_sqlitefts
|
|
|
|
import (
|
|
. "github.com/mickael-kerjean/filestash/server/common"
|
|
. "github.com/mickael-kerjean/filestash/server/plugin/plg_search_sqlitefts/crawler"
|
|
)
|
|
|
|
type SearchEngine struct{}
|
|
|
|
func (this SearchEngine) Query(app App, path string, keyword string) ([]IFile, error) {
|
|
DaemonState.HintLs(&app, path)
|
|
s := GetCrawler(&app)
|
|
if s == nil {
|
|
return nil, ErrNotReachable
|
|
}
|
|
if path == "" {
|
|
path = "/"
|
|
}
|
|
return s.State.Search(path, keyword)
|
|
}
|