[SOLVED] Searx returns zero results on first search

My searx routinely returns zero results when I do a web search.

Sorry! we didn't find any results. Please use another query or search in more categories.

This happens routinely and regardless of the keywords in the search. For example, searching for United States of America returns zero results and generates the same error.

Second and subsequent searches using the same search terms for fine and return results as expected.

Is this a bug, a known issue, or something wrong with my setup? It’s easy enough to work around (search twice!) but it would be nice if I didn’t have to.

Thanks.

The most likely reason that I can think of is that the timeout for search queries might be too low. FreedomBox already sets this to a generous value of 20 seconds. Can you check if your queries are taking longer than that? Maybe the second query is simply returning values from the cache of the first one.

If you want to check the value of the timeout, the relevant configuration file is /etc/searx/settings.yml

That’s an interesting possibility, @njoseph. My queries take maybe 5 seconds or less to return a zero result. I do not think that the zero results are caused by a time out issue. I checked my \etc\searx\setting.yml file and the default is still set to request_timeout: 20.0

I have not changed any of the default settings of searX, but did notice that different search engines have different timeout values that range from 7.0 to 20.0 seconds. This is shown on the searX preferences > Engines page. I do not know whether or not this is relevant.

Hmmm, it’s strange behaviour for sure but easy enough to work around. I posted here just to see if it was a more widespread phenomenon. Perhaps it’s just me :slight_smile:

Thanks for your reply.

When I faced the same problem years ago when I was integrating Searx into FreedomBox, I could clearly see timeout errors in the search results page. So, I set the timeout to 20 seconds. Are you not seeing any timeout errors?

If you can find a setting that fixes this problem for you, please let us know.

It is also worth asking the developers of Searx about this.

Thanks, @njoseph. There are no timeout errors, so I’ll take this up with the searx developers. If I learn anything useful then I’ll report it back here.

1 Like

I was having the same problem - zero results for searches like ‘freedombox forums’. In google, this forum comes up as the first results.

I tried the public searx site ‘searx.forked.io’, and it produced the following error:

Error! Engines cannot retrieve results.
google (unexpected crash CAPTCHA required)
Please, try again later or find another searx instance.

So it appears the issue is related to searx interaction with google.

In preferences, I turned off google and turned on duckduckgo, and successfully got results!

3 Likes

Thanks, @jdhedden. I think you have solved the problem!

I don’t get the Google CAPTCHA error that you experienced with [searx.forked.io], (I get no error listed at all) but I did remove Google from the engine list in searx preferences to see if it would make any difference to the result set. Yes it did! If I remove Google, then I get search results back as expected and on first attempt. This has worked 10/10 times I’ve tested it. Woohoo! :grinning:

It’s slightly annoying to have to give up the results of Google’s searches, but prior to using searx, I was mainly using Duck Duck Go, so it’s no real loss for me.

Thanks for the tip. Problem is solved.

3 Likes