Advanced Search adds robust options to Vanilla’s native search to help users hunt down specific content within your community. It is available on Corporate level plans and above.
- Better indexing of content
- The ability to apply filters to searches
- Auto-complete of results as the user types the search terms
Enabling Advanced Search
To enable Advanced Search, you will need to enable the addon and then make a change to your base theme:
- On the addons page of the Dashboard, enable Advanced Search
- Under the Appearance section of the Dashboard, go to the Customize Theme page
- In the HTML tab, look for the following code {searchbox}
- Change that code to {searchbox_advanced}
Using Advanced Search
Navigating to /search
will bring you to a page with an expandable search bar. Clicking the arrow on the right side of the bar will show you all the extra parameters you have available for search:
You can also link to /search?adv=1
to have these options already expanded.
By default, users will only see these options on the /search
page.
Theming
To switch out the search bar on your homepage, simply place {searchbox}
or {searchbox_advanced}
in your custom theme.
How do I change the verbiage used on the searchbox?
Change {searchbox} to
{searchbox placeholder=“enter text here”}
Autocomplete
Advanced search also enables an autocomplete function that pulls results as you type.
If you are looking for something very specific, there are some additional parameters you can use to help narrow down results.
“keyword phrase”
: A phrase wrapped in quotes must occur in that order.+keyword
: The keyword must occur in the search result.-keyword
: The keyword must not occur in the result.
Excluding Content From Search
Normal viewing permissions apply to search results. Searching as a guest or member will not return results with content from moderation or administration sections.
Archiving a category will prevent its content from coming up in the site-based search. Threads in archived categories are still indexed by search engines. You can use this setting to exclude old announcements or other irrelevant threads from search results without causing broken links.
How are search results ranked?
We put in a lot of work under the hood to make our search smarter. Ideally, when you type some words in a searchbox you want to find something that exactly matches what you had in mind when you started typing. In reality, all we can do is find stuff that contains the same words or word forms that you typed. Where the search gets smart is in ranking those search results. The smartest search will put the best results near the top. But what determines the "bestness" of a search result? Well, there a few factors that go into search ranking.
- How many of the words you typed are in the search result? Most search engines incorporate this criteria when ranking your search results. The algorithms involved take a combination of the number of words, the rarity of words, and the order of the words you typed. All these factors are put into a match quality ranking.
- How new or old is the content being searched? Forums generate content at an incredibly fast pace. That content can get stale pretty quickly too. We found that sorting on keyword match quality only would show too many stale, useless results. We found that it's absolutely necessary to take into account how new or old content is when doing community search. You might be interested to know that this was our only sort criteria in the previous iteration of our search.
- How good is the content? As noted in the previous point: forums generate a lot of content and not all of it is good. Well, with our reactions system we provide users with a way of curating the content in your community. When users react positively to a post then it increases in score. When users react negatively to a post then it decreases in score. This score contributes to a post's search rank.
One word searches. If you search for just one word then the search is automatically sorted by most recent date alone. We found that a lot of people search for just one word to find out what is being said about that word right now. This type of one word search is very common with people searching for their own usernames. It's affectionately called an "ego search" and it let's people see what is being said about them.
Additional Resources