Skip to content

Commit

Permalink
search/bleve: lower ngram max and try score ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
Wessie committed Jun 26, 2024
1 parent a5f54ac commit 33b51ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion search/bleve/analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func AnalyzerConstructor(config map[string]interface{}, cache *registry.Cache) (
cjkFilter,
toLowerFilter,
unicodenorm.MustNewUnicodeNormalizeFilter(unicodenorm.NFC),
NgramFilter(2, 5),
NgramFilter(2, 3),
},
}
return &rv, nil
Expand Down
5 changes: 3 additions & 2 deletions search/bleve/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ import (
var (
DefaultLimit = 20
DefaultOffset = 0
DefaultSort = []string{"-priority", "_score"}
dataField = []string{"data"}
//DefaultSort = []string{"-priority", "_score"}
DefaultSort = []string{"_score", "-priority"}
dataField = []string{"data"}

searchPath = "/search"
searchJSONPath = "/search_json"
Expand Down

0 comments on commit 33b51ea

Please sign in to comment.