# Docs.rs search is broken?

**URL:** <https://internals.rust-lang.org/t/docs-rs-search-is-broken/9906>\
**Category:** tools and infrastructure\
**Created:** [April 27, 2019, 9:41pm UTC](https://internals.rust-lang.org/t/docs-rs-search-is-broken/9906 "2019-04-27T21:41:28Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![davemilter](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/davemilter/32/3493_2.png) [@davemilter](https://internals.rust-lang.org/u/davemilter)\
**Post date:** [April 27, 2019, 9:41pm UTC](https://internals.rust-lang.org/t/docs-rs-search-is-broken/9906/1 "2019-04-27T21:41:28Z")

</div>

I can not use search for syn crate in doc.rs .

After entering to [https://docs.rs/syn/0.15.33/syn/](https://docs.rs/syn/0.15.33/syn/) chromium and opera reports about blocking scripts from unsafe sources. And search just show “Loading search results…” and that is all.

I doubt that this is problem on my side, because of I try from several machines from different networks, plus I even try from mobile phone via 4G network all the same (browser on mobile phone does not report about blocking content, but it is the same “Loading search results…”)

Strange enough that search in previous version of syn works fine:

[https://docs.rs/syn/0.15.15/syn/?search=Macro](https://docs.rs/syn/0.15.15/syn/?search=Macro)

Is docs.rs defaced? Or something wrong with documentation generator that come with last version of rustc?

---

<div class="post-metadata">

**Author:** ![CAD97](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/cad97/32/3460_2.png) [@CAD97](https://internals.rust-lang.org/u/CAD97)\
**Post date:** [April 27, 2019, 11:26pm UTC](https://internals.rust-lang.org/t/docs-rs-search-is-broken/9906/2 "2019-04-27T23:26:28Z")

</div>

Issue reproduced on [another recent docs.rs documentation.](https://docs.rs/oxygengine/0.3.1/oxygengine/?search=Join) (Android Chrome.)

---

<div class="post-metadata">

**Author:** ![Dushistov](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/dushistov/32/4046_2.png) [@Dushistov](https://internals.rust-lang.org/u/Dushistov)\
**Post date:** [April 28, 2019, 12:03pm UTC](https://internals.rust-lang.org/t/docs-rs-search-is-broken/9906/3 "2019-04-28T12:03:41Z")

</div>

I pickuped the first crate from list on the doc.rs main page, and got the same issue:

[https://docs.rs/minisign/0.3.0/minisign/?search=test](https://docs.rs/minisign/0.3.0/minisign/?search=test)

Mozilla Firefox 66.0.3 / Linux 64bit

> <https://github.com/rust-lang/docs.rs/issues/316>

---

<div class="post-metadata">

**Author:** ![QuietMisdreavus](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/quietmisdreavus/32/2425_2.png) [@QuietMisdreavus](https://internals.rust-lang.org/u/QuietMisdreavus)\
**Post date:** [April 29, 2019, 4:28pm UTC](https://internals.rust-lang.org/t/docs-rs-search-is-broken/9906/4 "2019-04-29T16:28:14Z")

</div>

This was an issue where rustdoc changed how it laid out files in documentation, and docs.rs was not updated in time to handle it.

In [https://github.com/rust-lang/rust/pull/59776](https://github.com/rust-lang/rust/pull/59776), rustdoc was updated to add the “resource suffix” to the search index, so that the filename would change if a crate was rebuilt.

(This was a previous issue with in-doc search, where a crate was rebuilt to fix a visual issue in an older rustdoc, but the Cloudfront CDN had cached the old search index. Since the layout of the search index had also changed a while back, this caused issues when the search code expected the newer search index layout but received the old one. By changing the filename on each rebuild, Cloudfront would be able to load the proper file for the new version of docs.)

However, docs.rs had hard-coded a handful of paths to serve the search index, the aliases file, and the source file listing, which were now outdated, since the filenames were going to change each time rustdoc was updated. I had intended [https://github.com/rust-lang/docs.rs/pull/329](https://github.com/rust-lang/docs.rs/pull/329) to land before updating, but the PR did not work as intended the first time, and i ran out of time to fix it before we started building lots of new crates with the updated rustdoc. However, i was able to come back to it this morning, fix it up, and deploy it. New crates should be able to load their new search indexes now.

---

<div class="post-metadata">

**Author:** ![jethrogb](https://avatars.discourse-cdn.com/v4/letter/j/43a26b/32.png) [@jethrogb](https://internals.rust-lang.org/u/jethrogb)\
**Post date:** [April 30, 2019, 6:39am UTC](https://internals.rust-lang.org/t/docs-rs-search-is-broken/9906/5 "2019-04-30T06:39:53Z")

</div>

@QuietMisdreavus are you planning on re-generating the docs for crates that have broken docs?

---

<div class="post-metadata">

**Author:** ![QuietMisdreavus](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/quietmisdreavus/32/2425_2.png) [@QuietMisdreavus](https://internals.rust-lang.org/u/QuietMisdreavus)\
**Post date:** [April 30, 2019, 1:58pm UTC](https://internals.rust-lang.org/t/docs-rs-search-is-broken/9906/6 "2019-04-30T13:58:37Z")

</div>

@jethrogb Existing docs whose search was broken should not need to be rebuilt to get search working. (Separate issues have been found with this version of rustdoc that’s currently in use, so it’s possible, but i don’t like to mass-rebuild because i have to block the new-crate queue while i rebuild crates. The issue with search should be resolved without rebuilding, though.)

---

<div class="post-metadata">

**Author:** ![CAD97](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/cad97/32/3460_2.png) [@CAD97](https://internals.rust-lang.org/u/CAD97)\
**Post date:** [April 30, 2019, 2:10pm UTC](https://internals.rust-lang.org/t/docs-rs-search-is-broken/9906/7 "2019-04-30T14:10:13Z")

</div>

I can confirm that for at least the crate I linked, the effected version’s search is working again.

---

<div class="post-metadata">

**Author:** ![jethrogb](https://avatars.discourse-cdn.com/v4/letter/j/43a26b/32.png) [@jethrogb](https://internals.rust-lang.org/u/jethrogb)\
**Post date:** [April 30, 2019, 3:28pm UTC](https://internals.rust-lang.org/t/docs-rs-search-is-broken/9906/8 "2019-04-30T15:28:04Z")

</div>

> [@QuietMisdreavus](#):
>
> Existing docs whose search was broken should not need to be rebuilt to get search working.

You're right, great!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/system/32/14092_2.png) [@system](https://internals.rust-lang.org/u/system)\
**Post date:** [July 29, 2019, 3:28pm UTC](https://internals.rust-lang.org/t/docs-rs-search-is-broken/9906/9 "2019-07-29T15:28:09Z")

</div>

Closed on July 29, 2019, 3:28pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
