Skip to content

Commit

Permalink
change to default bm25 ranking
Browse files Browse the repository at this point in the history
  • Loading branch information
boyter committed Jun 11, 2020
1 parent 465821f commit af173c1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ func main() {
Use: "cs",
Long: "code spelunker (cs) code search.\n" +
"Version " + processor.Version + "\n" +
"Ben Boyter <ben@boyter.org>",
"Ben Boyter <ben@boyter.org>" +
"\n\n" +
"cs recursively searches the current directory using boolean logic\n" +
"optionally combined with regular expressions." +
"\n",
Version: processor.Version,
Run: func(cmd *cobra.Command, args []string) {
processor.SearchString = args
Expand Down Expand Up @@ -101,14 +105,14 @@ func main() {
"include-ext",
"i",
[]string{},
"limit to file extensions case sensitive [comma separated list: e.g. go,java,js,C,cpp]",
"limit to file extensions (N.B. case sensitive) [comma separated list: e.g. go,java,js,C,cpp]",
)
flags.BoolVarP(
&processor.FindRoot,
"find-root",
"r",
false,
"attempts to find the root of this repository by reverse recursively looking for .git or .hg",
"attempts to find the root of this repository by traversing in reverse looking for .git or .hg",
)
flags.StringSliceVar(
&processor.PathDenylist,
Expand Down Expand Up @@ -170,7 +174,7 @@ func main() {
flags.StringVar(
&processor.Ranker,
"ranker",
"tfidf",
"bm25",
"set ranking algorithm [tfidf, tfidfl, bm25]",
)

Expand Down
2 changes: 1 addition & 1 deletion processor/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"
)

var Version = "0.9.0 alpha"
var Version = "0.11.0 alpha"

// Clean up the input to avoid searching for spaces etc...
// Take the str cut it up, lower case everything except
Expand Down

0 comments on commit af173c1

Please sign in to comment.