This component allows users to highlight text in posts and search for it quickly. Searches can be set to be the forum’s search, for an external search (e.g. Google).
Since you don’t know the link to the topic here in the forum until it’s been approved, it always takes me a while to edit the Readme, too. I’m not always online when my topic is published, and I wait to edit the file until I know the link.
When Is external is not enabled and no valid results are found from search, can the external search engine be freely defined? For example, replace Google with Bing.
That is currently not a feature. There isn’t a good way to check if no results are found, this merely redirects the user to the search page with the query.
Hmmm… What I mean is that regardless of the search accuracy, when asking whether to use external search, whether you can change the search engine, that doesn’t require doing anything to “check if no results” . Currently it is fixed to use Google, and I hope to replace it with another search engine.
I might be misunderstanding, so please correct me if I’m wrong.
The is_external setting has to be ticked if the search method used is not the forum search, like Bing or Google. This is so that the component will redirect the user accordingly.
You can change the search_url setting to bing.com/search?q=%{selected_text} to search via Bing. As long as the search engine has a way to interpolate the search query, you can type it in.
It’s not your fault. It’s that my test environment and production environment have a difference of several versions of Discourse, which made me mistakenly think that the prompt asking whether to use Google search when forum search yields no results was added by this theme component. So it’s not only not your problem, but quite the opposite, it gives me an alternative solution to invoke external search from within the site. Well done.