Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pageRank/search_weight #1690

Open
wants to merge 2 commits into
base: next
Choose a base branch
from
Open

Conversation

Boegie19
Copy link
Contributor

@Boegie19 Boegie19 commented May 9, 2023

What does it do?

Added search:weight to metadata

Added search_weight an option for docs pages

Why is it needed?

makes search better

Related issue(s)/PR(s)

fixes #1673

Work required on strapi's

After the PR is accepted the following should be added to the crawler for search

recordExtractor: ({ $, helpers }) => {
    return helpers.docsearch({
      recordProps: {
        lvl0: {
          selectors: "header h1",
        },
        lvl1: "article h2",
        lvl2: "article h3",
        lvl3: "article h4",
        lvl4: "article h5",
        lvl5: "article h6",
        content: "article p, article li",
        // Add the line bellow 
        pageRank: ["meta[property="search:weight"]", 0.5]
      },
    });
  },
``

@Boegie19 Boegie19 requested a review from pwizla as a code owner May 9, 2023 15:21
@vercel
Copy link

vercel bot commented May 9, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
documentation ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 9, 2023 3:25pm

@pwizla
Copy link
Collaborator

pwizla commented May 9, 2023

Thanks. As this will impact Algolia I'll test it on docs-next first, hence changing the target branch.

@pwizla pwizla self-assigned this May 9, 2023
@pwizla pwizla added this to the 4.10.4 milestone May 9, 2023
@pwizla pwizla added source: repo PRs/issues not targeting a specific documentation but rather affecting the whole repo pr: chore labels May 9, 2023
@pwizla pwizla removed this from the 4.10.4 milestone May 9, 2023
@pwizla
Copy link
Collaborator

pwizla commented Oct 27, 2023

I'm not forgetting about this one, @Boegie19.
We'll have an intern working iforn the Strapi documentation in a few months from now, and that should give us more bandwidth to work on improving search. I'll get back to you about it early next year. This + AI chatbot integration should vastly improve the search experience :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: chore source: repo PRs/issues not targeting a specific documentation but rather affecting the whole repo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Request]: improve search
2 participants