grafana / k6-docs

The k6 documentation website.
https://grafana.com/docs/k6/latest/
84 stars 216 forks source link

Search terms lead to less relevant pages #928

Open MattDodsonEnglish opened 1 year ago

MattDodsonEnglish commented 1 year ago

Each of these search terms has an inappropriate result.

immavalls commented 1 year ago

stage shows as the top search result a page that does not exist anymore https://k6.io/docs/javascript-api/xk6-disruptor/get-started/welcome/

xk6-disruptor is in the alpha stage, undergoing active development. We do not guarantee API compatibility between releases. Your k6 scripts may need to be updated on each release until this extension reaches v1.0 release.

image

It should be https://k6.io/docs/javascript-api/xk6-disruptor/. Maybe I should report this part in a separate issue, a broken link?

Related to the current issue, we should probably not show this as the first result, even if it contains the word stage. stages actually gives a better top result for me, https://k6.io/docs/get-started/running-k6/#stages-ramping-up-down-vus.

image
MattDodsonEnglish commented 1 year ago

Thanks for reporting, Imma! I've updated the TODO.

I think we can set an synonym in algolia so that stage brings the same results as stages, but I'm not sure what would be the best page for stages. It could go in running k6, options or scenarios.

For the broken link, I'm guessing that's a problem of Algolia's indexing. This long-forgotten wiki page, "Algolia returns old URLs", suggests clearing the index. But I'm not sure whether that would have any bad consequences, I'd want to consult with @ppcano . As a first step, maybe we can just change the text from that page.

ppcano commented 1 year ago

@MattDodsonEnglish

No bad consequence. As states on the Algolia wiki page; clear the Index and do a new deployment.

MattDodsonEnglish commented 1 year ago

I don't think we need to clear it now, since "stage" no longer links to that invisible. I've marked the task done, but I think the next step would be adding some new metadata, then incorporating that into algolia search rankings. This way we could get "load zones" and "stage" to link to their respective best pages without needing to force the key words into titles or headings.

immavalls commented 1 year ago

I think we can set an synonym in algolia so that stage brings the same results as stages, but I'm not sure what would be the best page for stages. It could go in running k6, options or scenarios

In general, I don't like the idea of making singular and plural synonyms. They are usually treated equally via stemming/lemmatization. Depending on how the search engine works or is configured.

For Algolia we could probably use ignorePlurals if we need it at some point (and don't have it already). Changing that could have some side effects if we just want to fix this one case. Might not be worth it.

I like the change you did, from stage to phase, in https://k6.io/docs/javascript-api/xk6-disruptor/. That works for this concrete case, to remove the page from the results.

We could also force the concrete words stage and stages to show a different page. I would say the best link is https://k6.io/docs/using-k6/k6-options/reference/#stages, which is what I was looking for at the time. And had to resort to search for options to get there. This can probably be configured in Algolia via new metadata in the pages as you well suggest.

immavalls commented 1 year ago

If we try to search for the prometheus-remote-write it should probably show the top link as https://k6.io/docs/results-output/real-time/prometheus-remote-write/ but it does not appear there.

image

The first link is https://k6.io/docs/cloud/integrations/prometheus-remote-write/

Or at least if you search for prometheus output the top link should be the new output

image
immavalls commented 1 year ago

Another example, searching for New Relic

image

Leads to https://k6.io/docs/cloud/integrations/cloud-apm/new-relic/. But we don not see the best page for OSS which also mentions how to visualize the data (a user was asking in https://community.k6.io/t/how-to-create-new-relic-dashboard-for-k6/5903): https://k6.io/docs/results-output/real-time/new-relic/#visualisation-in-new-relic.

I found the page using google.