openj9-docs icon indicating copy to clipboard operation
openj9-docs copied to clipboard

Search failures at https://www.eclipse.org/openj9/docs/

Open gjdeval opened this issue 3 years ago • 5 comments

When searching to see whether OpenJ9 supports some JVM arg, the search box at the top of the page often fails, reporting "No matching documents" even when the arg is in fact supported and documented.

A recent example is -XX:ParallelGCThread
Searching with the full value shows "No matching documents", which does not change if I remove the "-" or remove "-XX:"

But if I start with just "Parallel" in the search box (no quotes), then '-XX:ParallelGCThread' is shown as a choice, among other JVM args containing the string 'parallel'.

gjdeval avatar Sep 08 '21 21:09 gjdeval

Search does seem a bit random. For example, "codecache" finds -XX:[+|-]PrintCodeCache but not -XX:codecachetotal. The MkDocs software levels need updating, which might make a difference. Looks like some search index options were added last June: https://www.mkdocs.org/about/release-notes/.

doveye avatar Feb 16 '22 09:02 doveye

The MkDocs levels have just been updated but this problem still exists. Needs more investigation. For example, looks like the colon (:) was until just a few days ago replaced by whitespace during a search: https://github.com/squidfunk/mkdocs-material/issues/4884.

doveye avatar Feb 02 '23 09:02 doveye

You can customize the search by using the separator ^docs property in your mkdocs.yml config file.

For example, here's what Material for MkDocs uses for their docs site:

plugins:
  - search:
      separator: '[\s\-,:!=\[\]()"/]+|(?!\b)(?=[A-Z][a-z])|\.(?!\d)|&[lg]t;'

And here's the config ^renovate-config we used to improve search on our Renovate docs site:

plugins:
  - search:
      separator: '[\s\-,:!?=\[\]()<>{}"/\\]+|\.(?!\d)|&[lg]t;'

Before you apply any of these configs, read the Material for MkDocs manual, and get help from somebody who knows their regex. 😉

HonkingGoose avatar Mar 06 '23 13:03 HonkingGoose

Thanks for the tips @HonkingGoose 🙂

doveye avatar Mar 06 '23 15:03 doveye

The Material for MkDocs maintainer is working on better search, see this issue:

  • https://github.com/squidfunk/mkdocs-material/issues/6307

There's also a PR with the new search as preview on that repository.

HonkingGoose avatar Nov 25 '23 13:11 HonkingGoose