Skip to content

feat(#2257): order docs/forum results first in Kapa search - #2258

Merged
jkuester merged 1 commit into
medic:mainfrom
jkuester:2257-data-search-source-ids-order
Sep 12, 2026
Merged

feat(#2257): order docs/forum results first in Kapa search#2258
jkuester merged 1 commit into
medic:mainfrom
jkuester:2257-data-search-source-ids-order

Conversation

@jkuester

Copy link
Copy Markdown
Contributor

Description

Closes #2257

According to the Kapa search config docs we can set the data-search-source-ids-order property to configure the order we want the search results to show up in. The id values we provide are our Kappa AI Sources (so docs, forum, cht-core files, cht-core issues, etc.

In this PR I have just set the ordering so the Docs results show first, followed by the forum results, followed by everything else. (Happy to adjust this as seems appropriate).

image

Alternatives

As you can see in the docs, there are several other properties we could set to further tune the experience. The most relevant of which is data-search-source-ids-include (or data-source-group-ids-include). With these properties we could filter exactly which sources we show results for on the search page. (E.g. only show Docs/Forum and never show code. Or even, show code, but not issues, or vice-versa.)

Because all of this is just an api call to Kappa, we can test different combos locally and see which results we like before pushing to prod... 👍

License

The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.

@mrjones-plip mrjones-plip left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice work on this! And...sorry - as it looks like I could have figured that out instead of punting it over to you or andra 🤦

Approving! main goal of "docs first in search" is achieved.

However, when i search for How to use the new Archive feature coming CHT 5.3 , the title of a forum post I made >20 days ago, it is not found in the search results. I think this has to do with search overall functionality though, and not the ordering we're facing here.

@jkuester

Copy link
Copy Markdown
Contributor Author

I can also confirm that forum threads were not pulling through as I expected in the search results. Not sure what's up with the indexing... 🤷 To clarify, I do see forum threads in the search results, but just not all the ones I expect based on my search criteria....

I agree with your assessment, though, that this is unrelated to our configuration here on the docs site.

@jkuester
jkuester merged commit 53dab06 into medic:main Sep 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs search results shouldn't include results from non-docs sources

2 participants