Web site address for effective duckduckgo !Bang

Hi all, this is a workflow tooling question for personal convenience:

TLDR: What is the correct url (or is there one) in the form of ${url}${search_term} that would directly return a search as if ${search_term} had been directly entered into the search bar at https://root.cern.ch/?

Long version:

  • duckduckgo’s !bang for root (literally “!root”) is broken

  • (explanation of duckduckgo !bang, and why it matters to me): As a convenience, a web search through duckduckgo has an option to prefix a search with a “!bang” to directly return searches through another site. This is very convenient while programming with c++ reference. I can enter !c++ lower_bound into the (duckduckgo) search toolbar and my browser directly goes to the top search result for lower_bound from http://www.cplusplus.com. This page has the documentation details for c++'s std::lower_bound which is what I want. It does this though by returning the url http://www.cplusplus.com/search.do?q=lower_bound, which cplusplus.com redirects to the correct page.

  • Current root status: Duckduckgo also has a bang for root, literally “!root”. However, it is to an old url search and is broken :slightly_frowning_face:. The current address for ${url} for !root is http://root.cern.ch/drupal/search/node/ which doesn’t work as a !bang as desired. It would be very convenient if:
    (a) there were an updated url such that !root TPRofile2D (for example) would return the equivalent of entering “TProfile2D” into the search bar at https://root.cern.ch/ or (even better in my opinion),
    (b) directly returned the top hit for that search

I would be happy to personally update the request at duckduckgo.com, but have not successfully found the proper url term.

Thanks very much!

FYI: !ihep is another terribly convenient bang

Hello, and welcome to the ROOT forum.
I personally do not know how to update this “duckduckgo !bang” for root.
I am not who to ping. Lets try @bellenot , @Axel , @eguiraud

Updates to DDG Bangs can be submitted on the same page as suggesting a new bang

Yes, thanks! I think I wasn’t clear in my question – I have updated it accordingly. I will be happy to request the update to the bang. However, I do not know the correct url with which to update the bang to get the desired behavior. Do you know?

Hi @daves ,
thank you for bringing this up. In fact I put in a request to update !root to just search inside ROOT: ROOT Reference Documentation a while ago, maybe a year ago, and never heard back from the maintainers.

I don’t remember exactly what I had proposed at the time, but I think the best URL would actually be the equivalent of searching site:root.cern/doc/master SEARCHTERM, e.g. https://duckduckgo.com/?q=site%3A%22root.cern%2Fdoc%2Fmaster%22+SEARCHTERM, as search engines are actually better at indexing our content than Doxygen.

@couet might be able to suggest a better URL, if it exists, as we had this discussion some time ago among the ROOT team: basically we need a URL such that e.g. https://some.url?search=SEARCHTERM leads to a page with search results for that search term in the ROOT docs.

Cheers,
Enrico

P.S.
I find it terrible that doxygen does not provide a real search page, it’s really a missing feature.

1 Like

Re-reading Daves original post, I get the impression the search bar being brought up specifically is this one, on the homepage.

Looking at the network panel, it appears that it’s actually searching with Google via their programmable search engine platform. I’ve no idea how it’s implemented, but I’m cautious it could require the use of an API key that would be private, meaning it could be hard to replicate this specific URL as a !bang, however I’ve not looked into the queries made in the browser in depth yet.

Yes – that is was the search bar which I was referring to. In my personal experience, that has quickly given me the best results. However, that is probably a matter of personal preference, and perhaps there are other, better solutions for the !root bang. Anything reasonable would be great, as the current implementation is broken.

I don’t think the search bar at root.cern does anything much more complex than searching google for site:root.cern SEARCHTERM@couet can correct me if I’m wrong.

P.S.
I know technically it uses https://programmablesearchengine.google.com , but the end result should be similar.

I think you are right. It is equivalent to google as fa as I understand. You mentioned the doxygen search engine before. Seems to me that can be an option too.