Skip to content

Commit

Permalink
fix(categories): remove quick
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksasiriski committed May 25, 2024
1 parent b5b625c commit 3c834b0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 36 deletions.
44 changes: 11 additions & 33 deletions src/config/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,6 @@ func NewImage() []engines.Name {
}
}

func NewQuick() []engines.Name {
return []engines.Name{
engines.BING,
engines.BRAVE,
engines.DUCKDUCKGO,
engines.GOOGLE,
engines.MOJEEK,
}
}

func NewScience() []engines.Name {
return []engines.Name{
engines.GOOGLESCHOLAR,
Expand Down Expand Up @@ -179,22 +169,22 @@ func New() Config {
Engines: NewGeneral(),
Ranking: NewRanking(),
Timings: CategoryTimings{
PreferredTimeoutMin: 1 * time.Second,
PreferredTimeoutMax: 2 * time.Second,
PreferredTimeoutMin: 500 * time.Millisecond,
PreferredTimeoutMax: 1200 * time.Millisecond,
PreferredResultsNumber: 20,
StepTime: 50 * time.Millisecond,
MinimumResultsNumber: 10,
MinimumResultsNumber: 11,
HardTimeout: 3 * time.Second,
},
},
category.IMAGES: {
Engines: NewImage(),
Ranking: NewRanking(),
Timings: CategoryTimings{
PreferredTimeoutMin: 1 * time.Second,
PreferredTimeoutMax: 2 * time.Second,
PreferredTimeoutMin: 500 * time.Millisecond,
PreferredTimeoutMax: 1200 * time.Millisecond,
PreferredResultsNumber: 40,
StepTime: 100 * time.Millisecond,
StepTime: 50 * time.Millisecond,
MinimumResultsNumber: 20,
HardTimeout: 3 * time.Second,
},
Expand All @@ -211,28 +201,16 @@ func New() Config {
HardTimeout: 3 * time.Second,
},
},
category.QUICK: {
Engines: NewQuick(),
Ranking: NewRanking(),
Timings: CategoryTimings{
PreferredTimeoutMin: 500 * time.Millisecond,
PreferredTimeoutMax: 1500 * time.Millisecond,
PreferredResultsNumber: 10,
StepTime: 25 * time.Millisecond,
MinimumResultsNumber: 5,
HardTimeout: 3 * time.Second,
},
},
category.THOROUGH: {
Engines: NewGeneral(),
Ranking: NewRanking(),
Timings: CategoryTimings{
PreferredTimeoutMin: 1 * time.Second,
PreferredTimeoutMax: 4 * time.Second,
PreferredResultsNumber: 70,
StepTime: 100 * time.Millisecond,
MinimumResultsNumber: 50,
HardTimeout: 5 * time.Second,
PreferredTimeoutMax: 2 * time.Second,
PreferredResultsNumber: 50,
StepTime: 200 * time.Millisecond,
MinimumResultsNumber: 30,
HardTimeout: 3 * time.Second,
},
},
},
Expand Down
2 changes: 0 additions & 2 deletions src/search/category/category.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ var FromString = map[string]Name{
"images": IMAGES,
"science": SCIENCE,
"sci": SCIENCE,
"quick": QUICK,
"fast": QUICK,
"thorough": THOROUGH,
"slow": THOROUGH,
}
Expand Down
1 change: 0 additions & 1 deletion src/search/category/name.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ const (
GENERAL Name = "general"
IMAGES Name = "images"
SCIENCE Name = "science"
QUICK Name = "quick"
THOROUGH Name = "thorough"
)

0 comments on commit 3c834b0

Please sign in to comment.