feat(#2257): order docs/forum results first in Kapa search - #2258
Conversation
mrjones-plip
left a comment
There was a problem hiding this comment.
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.
|
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. |
Description
Closes #2257
According to the Kapa search config docs we can set the
data-search-source-ids-orderproperty 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).
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(ordata-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.