Skip to content

Commit

Permalink
Merge pull request #306 from hearchco/as/fix/categories-thorough
Browse files Browse the repository at this point in the history
fix(categories)!: rename broad to thorough and replace surf with slow, increase timeout and results
  • Loading branch information
aleksasiriski authored May 13, 2024
2 parents 56eb98a + 0a256e1 commit f77d611
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
28 changes: 14 additions & 14 deletions src/config/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,39 +199,39 @@ func New() Config {
HardTimeout: 3 * time.Second,
},
},
category.QUICK: {
Engines: NewQuick(),
category.SCIENCE: {
Engines: NewScience(),
Ranking: NewRanking(),
Timings: CategoryTimings{
PreferredTimeoutMin: 500 * time.Millisecond,
PreferredTimeoutMax: 1500 * time.Millisecond,
PreferredTimeoutMin: 1 * time.Second,
PreferredTimeoutMax: 2 * time.Second,
PreferredResultsNumber: 10,
StepTime: 25 * time.Millisecond,
StepTime: 100 * time.Millisecond,
MinimumResultsNumber: 5,
HardTimeout: 3 * time.Second,
},
},
category.SCIENCE: {
Engines: NewScience(),
category.QUICK: {
Engines: NewQuick(),
Ranking: NewRanking(),
Timings: CategoryTimings{
PreferredTimeoutMin: 1 * time.Second,
PreferredTimeoutMax: 2 * time.Second,
PreferredTimeoutMin: 500 * time.Millisecond,
PreferredTimeoutMax: 1500 * time.Millisecond,
PreferredResultsNumber: 10,
StepTime: 100 * time.Millisecond,
StepTime: 25 * time.Millisecond,
MinimumResultsNumber: 5,
HardTimeout: 3 * time.Second,
},
},
category.BROAD: {
category.THOROUGH: {
Engines: NewGeneral(),
Ranking: NewRanking(),
Timings: CategoryTimings{
PreferredTimeoutMin: 1 * time.Second,
PreferredTimeoutMax: 3 * time.Second,
PreferredResultsNumber: 50,
PreferredTimeoutMax: 4 * time.Second,
PreferredResultsNumber: 70,
StepTime: 100 * time.Millisecond,
MinimumResultsNumber: 30,
MinimumResultsNumber: 50,
HardTimeout: 5 * time.Second,
},
},
Expand Down
16 changes: 8 additions & 8 deletions src/search/category/category.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import (
)

var FromString = map[string]Name{
"general": GENERAL,
"images": IMAGES,
"quick": QUICK,
"fast": QUICK,
"science": SCIENCE,
"sci": SCIENCE,
"broad": BROAD,
"surf": BROAD,
"general": GENERAL,
"images": IMAGES,
"science": SCIENCE,
"sci": SCIENCE,
"quick": QUICK,
"fast": QUICK,
"thorough": THOROUGH,
"slow": THOROUGH,
}

// returns category
Expand Down
4 changes: 2 additions & 2 deletions src/search/category/name.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const (
UNDEFINED Name = "undefined"
GENERAL Name = "general"
IMAGES Name = "images"
QUICK Name = "quick"
SCIENCE Name = "science"
BROAD Name = "broad"
QUICK Name = "quick"
THOROUGH Name = "thorough"
)

0 comments on commit f77d611

Please sign in to comment.