We're often asked how people can optimize--or dial in--their search results.
This is a multi-step process.
First: we only recommend tweaking your search weights or other settings once you have some concrete, specific examples to test with. Optimizing search for one scenario can sometimes cause poorer search results for another, so it helps to have a few examples of search phrases you want to test with, so you can test the before/after effects of making any changes.
If you have a few good examples handy (as well as some examples that you want to be sure won't be negatively impacted by your changes), here are our recommended steps:
Search options are controlled in KB settings > Search and synonyms in the General settings and Fine tuning tabs.
So this first tip is a fairly straightforward one: review the options available here and be sure you're using--or not using!--settings that make sense for your content.
Options here include controls for:
- Reader controls like pagination and sorting, whether they can filter searches by category, and search result article blurb format.
- Your primary search language.
- Whether to use autosuggest results as readers type their search phrase and what the behavior for that autosuggest is
- How typo-tolerant the search should be
- Which search fields are indexed for each type of search
For a full breakdown of these settings, refer to Set up search.
You can control which article fields are used for autosuggest and full search by setting your Search fields.
So the first step to tuning your search isn't really about search at all: it's about making sure that your content is well-structured in each of those fields.
Here are some key questions to get you started:
- Does the title present keywords that your readers might search for?
- Does the permalink present similar keywords?
- If you need to update it, add the previous permalink as an Old Link.
- And if you don't remember to do this, don't worry--you can turn on an option in KB settings > Article editor that will automatically prompt you to add the previous permalink as an Old Link.
- Does the body of your article contain the words and phrases people are most likely to search for?
- Are you consistently adding a meta description to your articles?
- This is an easy field to miss, but it's a great practice for maximizing SEO on public knowledge bases. If your knowledge base isn't public, it's still a fabulous field, since it's basically a free indexing field. And, depending on your other settings, it may help display relevant information on category pages and in search results, too.
- Are you using search phrases? Are all your authors using them in the same way? Refer to Use search phrases for more info.
- Do your articles consistently use the same word for the same concept, feature, or function? (This can include the article body, title, and permalink.)
- This one can be easy to overlook, but if your knowledge base has evolved over time and there are older sections that haven't been updated in a while, you might be surprised!
- If you include PDFs stored in KnowledgeOwl as hyperlinks or embedded in iframes, do they use similar terminology to your article body so that they still surface relevant content?
- Sometimes, PDFs are written by a different team or department and they use totally different terminology. This can skew search results in odd ways or surface entirely irrelevant content.
Holistic terminology approach
Any file of any type referenced in your knowledge base should use some key terminology the same way, wherever possible!
- Sometimes, PDFs are written by a different team or department and they use totally different terminology. This can skew search results in odd ways or surface entirely irrelevant content.
Use the Search field weights in KB settings > Search and synonyms > Fine tuning to make certain fields more important in ordering your search results This lets you dial in your search a bit to fit your content.
By default, all the fields we index for search (article title, permalink, body, PDFs, meta description, and search phrases) are given an equal weight of 1. Giving a field a higher weight makes it count for more in the ranking.
Proceed with caution
We recommend working with search field weights once you have a fair amount of content and/or once you've gotten feedback about search results. Otherwise, you can optimize for the wrong things.
The best way to make changes here is to have a few specific examples to test with.
Then:
- Go to KB settings > Search and synonyms. The General settings tab opens.
- Open the Fine tuning tab.
- In the Preview field weight changes section, enter a Test search phrase. Note the relevancy scores and order it gives back to you.
- Make changes to the Search field weights section. We recommend only going up by the next available increment in the dropdown to start. Don't save your changes yet. 😉
- Now rerun your test search phrase in the Preview field weight changes section. See if you've gotten closer to the order you're looking for.
- Test with multiple phrases to be sure that you haven't optimized for one scenario but hurt another one. (This is the tricky part of touching your search weights!)
- Once you've found a weight you like, Save your changes.
You won't need to reindex or anything--those weight changes will take immediate effect. If your weights are getting closer but still not amazing, refer to the next tip on search phrases!
Refer to Search field weights and Preview field weight changes for more information on working with these features.
As an example, here are the search weights we're currently using in support.knowledgeowl.com:
- Title: 10
- Permalink: 1
- Body: 1
- PDFs: 1
- Meta description: 1
- Search phrases: 30
We only add search phrases to help "bump up" an article in search results.
By now, I hope you've picked up on the fact that you don't need to do anything for your content to be indexed for search--it just is.
So why do we include search phrases, if we're already indexing the title, permalink, body, PDFs, and meta description?
To give you more control.
Search phrases serve two main purposes:
- To add a search phrase that doesn't appear in the body of the article. This can be really helpful if there's an alternate phrase or term that your readers might use that you don't want in the documentation itself, like an acronym or abbreviation.
- You don't need to do anything else special--just add the search phrase. (If you have a lot of these, refer to our next search optimization tip on synonyms--you're gonna love them!).
- To "bump up" a select number of articles that contain that phrase. If you have 50 articles that mention the word "cheese", you might add "cheese" as a search phrase only to the 3-5 most important articles about cheese. This lets you game the relevancy algorithm just a little.
- You'll likely want to increase the search field weight of Search phrases. (We do this in our Support knowledge base, using a search weight of 30 for search phrases.)
This second setup can be really useful when you use a term in a lot of your documentation, but you want to curate some articles to return at the top of the search when that term is searched.
Again, you don't need to change any settings or reindex to use this option; just add relevant search phrases to your article and save it.
Want to know how search phrases are already used?
Head over to Manage Articles, take a CSV export of any view there, and include the Search phrases column in your CSV export if you want to get a feel for where and how search phrases are currently used.
Synonyms are one of the unsung heroes of your knowledge base. You probably don't know they're there, but they can make a huge difference to how you write your content--and how it's indexed.
Synonyms' entire purpose is to help your search index work harder and do more.
Let's return to that first use case we mentioned for search phrases:
Add a search phrase that doesn't appear in the body of the article. This can be really helpful if there's an alternate phrase or term that your readers might use that you don't want in the documentation itself, like an acronym or abbreviation.
So, for example, in our documentation, we use the phrase "knowledge base" a fair amount. We believe strongly in the two-word format. It's in our style guide.
From a content creator's perspective, this is great: we're totally consistent in our content.
But we get a lot of readers who might search for various permutations of that word, including:
- knowledgebase
- kbase
- k base
Now, one way to address this would be to add a search phrase for each of these variations to every article where we use the phrase "knowledge base". That would solve the problem--someone searching for one of these variations would get to the content they need.
But that puts a lot of pressure on us to remember to do that.
And what happens if we find out next week that people start searching for "base site" or something else? We'd have to go manually edit all those articles to have that search phrase, too.
This is where synonyms really shine.
You define the synonym once, then you reindex your knowledge base, and our search indexing does that work for you.
So in our case, we never worry about adding "knowledgebase" or "kbase" as a search phrase, because we have a global synonym defined for it. And we can go update that synonym at any time and (once we run a search reindex) it will take effect across all of our articles.
Synonyms are fantastic for things like:
- Variations of the official term you use for something
- Acronyms or abbreviations your readers might search for that correspond to official terms--this way you don't necessarily have to include both the fully-written-out term and the acronym in every article
The one key here is that after you create synonyms, you'll need to reindex your knowledge base for them to take effect. Reindexing can take a couple minutes and it will knock out search results while it runs, so it's generally best to time your reindexes for off-hours.
So you've gotten your search behaving fairly well overall, and things seem to be humming along great: you've gotten the settings how you like them, your content's using consistent terminology, you've tweaked your search weights a little, and you're using search phrases or synonyms to really stretch search.
Now what?
Generally, if you don't get complaints about people being unable to find things, there's not a whole lot else to do.
But if you like to keep an eye out for potential synonyms, content gaps, or search phrase needs, check out the Searches with no results report in Reporting > Dashboard.
This will help you identify words or phrases that your readers are searching for and coming up empty. Sometimes these are great candidates for synonyms or search phrases; sometimes they alert you to content gaps; sometimes they can even clue you in to features that your product or company is lacking.
In an ideal world, you'd want to include reviewing this report into a regular content update habit, though the frequency of this depends on how high your knowledge base usage is.