Skip to content

Fix search query selector

Marcia Ramos requested to merge fix-search into master

Our site search is bugged. I think it might be because of !1192 (merged). 🤔

OpenSearch

How it used to be

  1. Type docs.gitlab.com in your browser and press Tab.
  2. Enter the search query in the browser and press Enter.
  3. The browser takes you to docs.gitlab.com/search/?q=search-query showing the search results.

How it is now

  1. Type docs.gitlab.com in your browser and press Tab.
  2. Enter the search query and press Enter.
  3. The browser takes you to docs.gitlab.com/search/?q=search-query but shows no search results.

Why

Now instead of ?q={search query} we have ?query={search query}.

The change to the file opensearch.xml fixes this.

InstantSearch

How it used to be

  1. Open any docs page on docs.gitlab.com.
  2. Type a query in the search box.
  3. Do not select any results and press Enter.
  4. The browser takes you to docs.gitlab.com/search/?q=search-query showing the search results.

How it is now

  1. Open any docs page on docs.gitlab.com.
  2. Type a query in the search box.
  3. Do not select any results and press enter.
  4. The browser takes you to docs.gitlab.com/search/?q=search-query but shows no search results.

Why

Now instead of ?q={search query} we have ?query={search query}.

The change to the file header.html fixes this.

Merge request reports