Repository: material-ui
Issue: [docs-infra] Improve Algolia internal search results on mui.com
Labels: enhancement,scope: docs-infra

Listing various points that could be improved for searching our docs. Also documenting unhelpful search results. It's not about implementing all of those but exploring how viable they are or if they have better alternatives.

### Opportunities

- [x] 1. Be able to search inside the content of the page, not just headers.
- [x] 2. Broken UI on blog post, e.g. https://mui.com/blog/v6-beta-pickers/. The style loading logic is broken. mui/material-ui#33731
- [ ] 3. Easy switch between projects, e.g. https://www.mux.com/blog/the-building-blocks-of-great-docs https://github.com/mui/material-ui/issues/41541

<img width="251" alt="Screenshot 2023-02-13 at 22 19 42" src="https://user-images.githubusercontent.com/3165635/218576918-5d41eefa-1a5f-48e0-8cea-6e300040c3a3.png">

or https://twitter.com/delba_oliveira/status/1664323492077256704

- [ ] 4. The search bar in the header blinks when changing pages. This shouldn't happen.
- [x] 5. Remove the `#main-content` noise. Reproduction: search for Alert
  <img width="752" alt="Screenshot 2022-06-16 at 12 37 37" src="https://user-images.githubusercontent.com/3165635/191579759-e94b0758-04d5-4ad1-9fb8-097479d761b1.png">
  You land on [https://mui.com/material-ui/react-alert/#main-content](https://mui.com/material-ui/react-alert/#main-content). There are tons of links like this in Stack Overflow, we can do better, the UX is confusing, no, it doesn't link an h2, it's the h1.
Fixed by adding:

```js
$("#main-content, #__next").removeAttr("id");
```

In the crawler logic (https://crawler.algolia.com/admin/crawlers/739c29c8-99ea-4945-bd27-17a1df391902/configuration/edit). 
 
- [ ] 6. Implement OpenSearch mui/material-ui#29445
- [x] 7. Index MUI X. e.g. https://mui.com/x/introduction/licensing/ and related pages. It would solve https://github.com/mui/mui-x/pull/5074#discussion_r898210356
- [x] 8. Index MUI System e.g. https://mui.com/system/getting-started/overview/ and related pages. It would solve https://www.algolia.com/apps/TZGZ85B9TB/analytics/no-results/material-ui?from=2022-09-14&to=2022-09-20.
- [x] 9. Move the `product` attribute from the crawler configuration https://crawler.algolia.com/admin/crawlers/739c29c8-99ea-4945-bd27-17a1df391902/configuration/edit to the page, e.g. https://github.com/mui/material-ui/blob/29fd59e746b9d7ceec2e692e26f08bc3fd6c566a/docs/data/joy/components/alert/alert.md?plain=1#L2. It would be simpler. For example, from a docs versioning perspective, it's painful to have to come to Algolia's Crawler to make a change to have things keep working.
- [x] 10. Index MUI Toolpad, e.g. https://mui.com/toolpad/getting-started/overview/
- [ ] 11. Fix moving scrollbar when opening the search (you can test on Windows)
- [ ] 12. Migrate the UI to https://github.com/mui/mui-x/issues/13932
- [x] 13. Duplicate lang property https://www.algolia.com/apps/TZGZ85B9TB/explorer/browse/material-ui?page=1&searchMode=objectID

  <img width="238" alt="Screenshot 2022-09-21 at 20 23 35" src="https://user-images.githubusercontent.com/3165635/191581669-c4df93cd-3335-4fcf-9396-615f0159b2be.png">

  Likely a conflict between
  
  https://github.com/mui/material-ui/blob/29fd59e746b9d7ceec2e692e26f08bc3fd6c566a/docs/src/modules/components/Head.tsx#L58
  
  and https://docsearch.algolia.com/docs/record-extractor#indexing-content-for-faceting

- [ ] 14. Move `popularity` and `pageRank` configuration from the Crawler UI to the markdown pages.
- [x] 15. Use [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/?client=javascript) to so that each product team can filter the analytics in the Algolia admin 

  <img width="861" alt="Screenshot 2022-09-27 at 12 04 34" src="https://user-images.githubusercontent.com/3165635/192497576-5fca9bb5-87ec-4ca7-b266-c7a522e55163.png">

  Fixed in mui/material-ui#37600

- [ ] 16. Implement click analytics to measure the impact of search ranking changes https://github.com/algolia/docsearch/issues/1045

### Fix unhelpful results

- [x] "FilledInput" (top 5 results link to /api/filled-input page)
- [x] "material tabs"