hearchco / agent

Agent for Hearchco built using Go.
https://hearch.co
GNU Affero General Public License v3.0
19 stars 1 forks source link

fix(search): timings #305

Closed aleksasiriski closed 1 month ago

aleksasiriski commented 1 month ago

Algo explanation:

1) Wait for PreferredTimeoutMin before checking the number of engines 2) Check if the number of results is more than or equal to the PreferredResultsNumber 3) If not, wait additional StepTime until either PreferredResultsNumber or PreferredTimeoutMax is reached 4) Check if the number of results is more than or equal to the MinimumResultsNumber 5) If not, wait additional StepTime until either MinimumResultsNumber or HardTimeout is reached

If at any time all engines respond, the results will be returned immediately. This now will hopefully return results as quickly as possible but also prefer to return slow but some results instead of not returning anything.

Default options for GENERAL:

Default options for IMAGES:

Default options for QUICK: