Search - separate doc and api reference results #2423
Replies: 2 comments
|
Adding on to say I'd love the ability to define and prioritize different categories of docs in search results. @jul-dan has a good point about API docs cluttering up results, but in my case that extends to a few other content types we're currently housing under the docs umbrella. For example, the Omni docs also include the changelog and our weekly product demos. Demos ranking higher than official docs isn't the best experience for an end user, who might think that's the most relevant content for whatever they're looking for. A coworker sent me this screenshot of search results this morning for this very scenario. We have docs for the
There are already page-level Frontmatter knobs to tune search results; some global ones would be great. For example, you could define specific content types, assign paths to the type, and then assign a priority: {
"content_types": [
{
"type": "docs",
"search_priority": 1,
"paths": [
"/path/1",
"/path/2",
"..."
]
},
{
"type": "api",
"search_priority": 2,
"paths": [
"/api"
]
},
{
"type": "demos",
"search_priority": 3,
"paths": [
"/demos"
]
}
]
} |


Uh oh!
There was an error while loading. Please reload this page.
Hey 👋🏻

Today we have a documentation with an API doc.
When we search for a keyword the API reference results are mixed (or must of the time displayed at the top).
So our users don't find the relevant information in the documentation
Will be possible to have two sections: documentation results and API reference results or at least maybe sort all the results to put the API reference results at the end?
Thanks!
All reactions