rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
96.86k stars 12.51k forks source link

Add opensearch support to doc.rust-lang.org #24899

Open jorisgio opened 9 years ago

jorisgio commented 9 years ago

Opensearch is a common API to query search engine. It is for instanced used to add search engines to the firefox search bar and to chrome.

It would be nice if doc.rust-lang.org supported opensearch to enable doc search directly from firefox.

cc @steveklabnik

ghost commented 9 years ago

Unfortunately, search for doc.rust-lang.org is performed client-side using a precompiled index so this would require a dedicated Web service, which is a non-trivial complication infrastructure wise.

There are some search-as-a-service products that may have a high free quota and tolerable pricing above it, and those could be used as an alternative.

jorisgio commented 9 years ago

I see. It probably doesn't worth the trouble then.

ghost commented 9 years ago

Well, this could just as well be a simple Heroku app that implements http://www.opensearch.org/Specifications/OpenSearch/Extensions/Suggestions/1.1 using http://doc.rust-lang.org/search-index.js from the rust nightly. It's doable.

steveklabnik commented 9 years ago

Heroku's free tier is going to basically be inappropriate with their next pricing adjustment.

@jorisgio , I agree this would be cool, but I doubt that we're going to tackle this any time soon.

sanpii commented 8 years ago

Server side search works now: https://doc.rust-lang.org/std/?search=string

steveklabnik commented 5 years ago

Triage: no comments in over two years. @rust-lang/rustdoc is this something we're interested in pursuing?

GuillaumeGomez commented 5 years ago

I'm not sure we'd want this: it only works on firefox and would require to have a full infrastructure behind to power it.

jsha commented 3 years ago

I think the underlying desire here is that browsers should automatically figure out that doc.rust-lang.org has a search engine, and when you start typing "doc.." they should suggest "Search Rust documentation." I think that's feasible without running a whole backend search engine, but it would require some tweaks to how we do things, which I talk about here: https://github.com/rust-lang/rust/issues/84214#issuecomment-822211338

I think the main tweak would have to be that doc.rust-lang.org would have to stop being a redirect to a different domain, and it would need to have a search box prominently featured. I think those would be good changes.