If you're searching for content and not having much luck with the results -- or perhaps you're getting too many results -- review the information in this article for tips on how to run a more efficient search which will lead to a more refined set of results.
NOTE: The Community search feature is built using Apache Solr.
While this article documents some of the more common search functions, we encourage you to visit the Solr site to supplement this information and learn more about, for example, Fuzzy Searches and Escaping Special Characters.
Sorting and scoring search results
Search results can be sorted by Relevance, Most Recent (i.e., newest), or Least Recent (i.e., oldest), with Most Recent and Least Recent being sorted simply by their creation dates.
When the search results are sorted by Relevance, their placement in the list is per piece of content and is based on a "scoring" process (also known as "weighting") that considers:
- the number of times the search term is used and
- where in the content (Title, Description, etc.; described in Content sections scoring, below) the search term is used.
Content sections scoring
Scoring search terms, as mentioned, is partially based on where the term occurs in the content. The scoring process first looks at the following sections (i.e., "parts") of a piece of content and then applies "boost" factors, as described.
NOTE: The sections and factors are presented below in descending order, based on their "weight."
- Title - the names of the (piece of) content, such as the subject of a blog
- Description - the body or description of the content, such as the body or description of a blog
- Text in other fields - the text in fields such as Comments; any fields other than Title or Description
- Descendants - the text in entries that follow an original, such as discussion replies and attachments
- Boosts - the following characteristics can also impact Relevance scoring
- Time - the more recent the search term is used, the greater the boost
- Quantity - the more often the search term is used, the greater the boost
- Direct match - if the search term is a direct match in content, there is a slight boost
- Stemming - is a match on a derivative of the search term. For example, "friendly" and "friendliness" are derivative hits (stems) of "friend."
Search behaviors & operators
A basic search will look for just the term that you've specified, such as the word blogs.
NOTE: Search words are not case sensitive. Searching on Blog will yield the same results as blog, bLOg, etc.
TIP: You can include search operators when you search. Search operators are optional elements that apply "conditions" to the search and result in fewer but more focused results. Essentially, you are "pre-filtering" the search to make it more efficient.
Search operators & their use
Search operators can be words (such as and, or, and TO) and other characters (such as quotation marks and asterisks). They have predefined behaviors that are universal to search functions.
The list that follows describes some of the more common search operators and how they affect a search operation.
Quotation marks (" ") - Words within quotation marks (such as "blog post") are treated as a single search term. The search will not return instances of "blog" or "post" -- only instances of "blog post" are valid.
Asterisk ( * ) - Use an asterisk as a wild card. Wild cards can be placed anywhere in the search term and instruct the search to allow any character or characters to replace the value. For example:
- innovat* returns innovation, innovate, and innovated
- *ceive returns receive, perceive, and deceive
- br*d returns bread, brand, and broad
Plus symbol ( + ) - Use a plus symbol to make a term mandatory; this is known as the "required" operator. Other specified terms are optional, but the term immediately following the + must be somewhere in the content in order for the search to return it as a match. For example:
- +blog volunteer returns content that does contain blog but which might not contain volunteer
Tags - Use this operator with a search term to query the tags across your site and return only the content that is tagged with the search term. For example:
- Tags:webinar returns only the content items with the webinar tag.
NOTE: Untagged content will not be returned.
Logical Operator, "and" - Use "and" to find content in your site that contains several specified search terms. For example:
- blog and volunteer returns only content items in which both blog AND volunteer appear.
Logical Operator, "or" - Use "or" to find content in your site that contains any one of several terms. For example:
- blog or volunteer returns all content items in which either blog OR volunteer appears.
TIP: This is the default operator. If a search expression has two or more terms but does not have any operators, "or" is assumed and applied to the search.
Parentheses/Grouping [ () ] - Use parentheses to "group" the functionality of the "and" and "or" operators for more focused results. For example:
- post and (discussion or blog or library) returns content items that includes post and at least one of discussion, blog, or library.
TIP: You can use multiple instances of the logical operators.
Hyphen/Exclude - Place a hyphen before a term in order to omit (exclude) from the results any content in which that term appears. For example:
- -blog will omit any content items that contain the word blog.
TIP: This operator can be used with the parentheses/groupings operator.