Improve search

This commit is contained in:
2025-09-08 21:59:55 +08:00
parent 2848e4c5e1
commit 24ba97817a
3 changed files with 21 additions and 6 deletions

View File

@@ -7,7 +7,6 @@ import (
"nysoure/server/model"
"nysoure/server/utils"
"strconv"
"strings"
"time"
"github.com/blevesearch/bleve"
@@ -81,8 +80,6 @@ func init() {
}
func SearchResource(keyword string) ([]uint, error) {
keyword = strings.Replace(keyword, "-", " ", -1)
query := bleve.NewMatchQuery(keyword)
searchRequest := bleve.NewSearchRequest(query)
searchRequest.Size = 1000