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

wip: Demo of using pagefind search #3081

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

wip: Demo of using pagefind search #3081

wants to merge 3 commits into from

Conversation

corneliusroemer
Copy link
Contributor

@corneliusroemer corneliusroemer commented Oct 27, 2024

relates to #3079

preview URL: https://search.loculus.org

Summary

I've copied a dummy index over from pathoplexus, to show how it would work. So if you click on links, most go 404 - that's expected.

The CSS is still super ugly, needs some care to port over from starlight (or adaptation/redesign, but I prefer the modal over the pagefind default UI)

Ignore the many index files in /public, this is just to make the preview work

Screenshot

2024-10-27 12 49 28

@corneliusroemer corneliusroemer added preview Triggers a deployment to argocd format_me Triggers github_actions to format website code on PR labels Oct 27, 2024
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is cool!

I think seeing a search box at the top of a database I might have an initial expectation that it would search the database rather than (just) the docs. I guess one thing we could do would be to detect accession-like search entries and make a special link for them.

Copy link
Contributor Author

@corneliusroemer corneliusroemer Oct 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was mostly thinking about docs search as the use case here, e.g. locating the minutes - Pagefind might not scale to hundreds of thousands of pages. But indeed, we could intercept searches for things like PP_ or similar and don't give them to Pagefind but use our own search engine of kinds.

Would indeed be cool if there was a global search one could just paste an accession into and get results - hadn't thought of that at all until you mentioned it.

Copy link
Member

@theosanderson theosanderson Oct 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah basically I think a docs-only search would ideally have a different presentation to make clear that that's what it is.

The search box here

image

would confuse me if it searched docs :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be cool to include the top level organism pages like https://search.loculus.org/cchf/search? too (I know this is just a demo :) )

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yeah - it's easy to add extra pages to the index. I created the index as explained here: #3079 (comment)

I'm not sure why the organism search pages weren't indexed, maybe because they are behind a redirect and wget didn't get there as a result. I was just hacking things together, didn't spend much time on any part of it.

@corneliusroemer corneliusroemer linked an issue Oct 27, 2024 that may be closed by this pull request
@corneliusroemer corneliusroemer removed the preview Triggers a deployment to argocd label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
format_me Triggers github_actions to format website code on PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pagefind for search
2 participants