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

Search terms lead to less relevant pages

Open MattDodsonEnglish opened this issue 2 years ago • 7 comments

Each of these search terms has an inappropriate result.

  • [x] "xk6-browser"
    • goes to extensions, should go to /javascript-api/
  • [x] "Options"
    • goes to Redis, should go to using-k6/k6-options
    • Possibly fixed by changing Redis h1: https://github.com/grafana/k6-docs/commit/f1781fd89b51794dc6ab4cea8d8bc97b5bd12b66
  • [x] Load zones
    • goes to Private load zones, should go to /creating-and-running-a-test/cloud-tests-from-the-cli/cloud-execution-reference/#load-zones
    • Not first result, but second result after synonym was added
  • [x] Stage
    • goes to xk6-disruptor, should go to ??

MattDodsonEnglish avatar Dec 01 '22 13:12 MattDodsonEnglish

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

immavalls avatar Dec 09 '22 09:12 immavalls

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.

MattDodsonEnglish avatar Dec 12 '22 21:12 MattDodsonEnglish

@MattDodsonEnglish

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

ppcano avatar Dec 13 '22 09:12 ppcano

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.

MattDodsonEnglish avatar Dec 13 '22 18:12 MattDodsonEnglish

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 avatar Dec 14 '22 10:12 immavalls

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 avatar Jan 04 '23 14:01 immavalls

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.

immavalls avatar Feb 09 '23 14:02 immavalls