gatsby: Search is broken on v1 documentation site
Description
When I search the v1 docs site, I get results for pages that only exist on v2. If I click them I get taken to an error page.
Steps to reproduce
- Visit https://v1.gatsbyjs.org/docs/
- Focus search input, type in
createPage
, click first result - You are taken to this page: https://v1.gatsbyjs.org/docs/page-creation/#oncreatepage-api
Expected result
Results for v2 site should not show up when searching on v1 site.
Actual result
New page loads in weird state, loading icon never goes away and my macbook pro’s fans turn on. Can’t immediately tell what is going on by looking at network tab.
Environment
Able to reproduce here: https://v1.gatsbyjs.org/docs/
Firefox 62.0.3 (64-bit) macOS High Sierra Version 10.13.6
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 21 (14 by maintainers)
Commits related to this issue
- feat(www): add docsearch:version meta tag (#9186) add meta tag so docsearch can index both v1 and v2 websites see https://github.com/gatsbyjs/gatsby/issues/9159#issuecomment-430604230 — committed to gatsbyjs/gatsby by pieh 6 years ago
- new versions integration of gatsbyjs/gatsby#9159 — committed to algolia/docsearch-configs by deleted user 6 years ago
- feat(www): add docsearch:version meta tag (#9186) add meta tag so docsearch can index both v1 and v2 websites see https://github.com/gatsbyjs/gatsby/issues/9159#issuecomment-430604230 — committed to gpetrioli/gatsby by pieh 6 years ago
👋 We can continue to use the same index and add a
facetFilter
in order to reduce the scope of the search to either v1 or v2. Your analytics will be more relevant.Could you add a meta tag within your website in order to highlight the version of your documenation? It should looks this way:
Then ping me and I will update your index
I would say that searching from within the v1 docs should only yield results from the v1 docs, and vice-versa.
Hey again!
It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it.
Please keep in mind that I’m only a robot, so if I’ve closed this issue in error, I’m
HUMAN_EMOTION_SORRY
. Please feel free to reopen this issue or create a new one if you need anything else.Thanks again for being part of the Gatsby community!
💜🙏🤗🙌 @s-pace, @Yurickh and @pieh!
Thanks for offer @Yurickh - I was just doing that when you commented 😉
My guess here is that we’ll need to create a new index in docsearch for the v1 docs, but I’m not sure on how to.
Edit: Yup, the current docsearch config currently crawls the www.gatsbyjs.org url. We’ll need to apply again for a new config file in docsearch with the new subdomain. From what I’ve read in their docs, I would guess that only the @gatsbyjs/inkteam can apply here.