By Cathy Dew
So far in this blog series, we’ve looked at a few different ways to supercharge your SharePoint search. From metadata to managed properties, refiners to indexed columns, we’ve looked at the configurations that can turn a standard search into a “power search.” Now that we’ve talked extensively about configuring the SharePoint search function, let’s talk about putting those configurations to good use. Specifically, this blog post will be about how to search SharePoint now that you’ve laid the groundwork for power search.
Searching at the Site Collection Level vs Searching at the Library Level
By default, SharePoint’s search engine is designed to search everything in a SharePoint site collection. That means that your search should be able to pull everything from all the sites, pages, document libraries, lists, folders, and documents. SharePoint’s search engine will search both document text and metadata, returning anything that matches your search criteria. So long as data has been properly indexed, it should show up in your SharePoint site collection search.
Of course, this kind of vast, overarching search can be trouble if 1) you have an enormous SharePoint site collection, or 2) your search isn’t specific enough to narrow the results much.
Indeed, a Global search—the default site collection search—can pull extremely long lists of search results, which isn’t always helpful. Using the Global search box, you can limit the search in a few ways. The box lets you decide whether you want to search everything or just people, just conversations, or just the site you are viewing when you launch the search. (You can also configure other pseudo-refiners for the Global search, but they aren’t enabled by default.)
If you know which SharePoint library houses the file you need, you will almost always be better off searching at the local level. This statement is particularly the case for libraries or lists that have more than 5,000 files. If you have a bunch of SharePoint document libraries packed with files, then a site collection search might not help you make much progress toward finding the file you need.
In such situations, your best bet is to use the document library search box. This live search function lets you conduct library-specific searches right there on the library page. It keeps your search smaller and more limited and gives you a better chance of quickly finding the file you need—at least if you know for sure that the file is in that library.
You can also use an “Advanced Search” to make finding specific files easier. You can find the Advanced Search function by clicking “Advanced” next to the search box on your search results page. Advanced Search lets you search for specific phrases, words, document formats, and more. It allows you to specify words you don’t want included in your search. It enables you to set property restrictions so you can look for specific authors, dates, and more. In short, it allows you to unlock a lot of the tools and features you configured while working toward SharePoint power search.
What You Need to Know about Search Keyword Query Language
Advanced Search is a useful way to get more out of your managed properties, managed metadata, and other SharePoint organization techniques. It is not, however, the only way. On the contrary, you can also narrow and finesse your search if you know the right things to type into the search box. These qualifiers let you use Advanced Search without having to open the Advanced Search function.
Mastering what to type in the search box means learning SharePoint’s Keyword Query Language, or KQL. All search functions have their own KQL that you can use to adapt, filter, narrow, and improve searches. SharePoint is no exception, and understanding how SharePoint’s KQL works will make SharePoint navigation and file discoverability a lot easier for you and your end users.
The common strategy with SharePoint search (or any search function, for that matter) is just to type a keyword is key phrase into the search box and hit enter. While this tactic can find you what you need, it isn’t always helpful—particularly if you aren’t exactly sure what you are looking for or are searching in a large SharePoint library.
SharePoint KQL moves significantly beyond simple keyword and key phrase inquiries—though they are still factors. Here’s how to refine your search with KQL:
- AND: Typing “AND” into your search isn’t usually necessary, but it is one part of SharePoint’s KQL. Say you are looking for documents about research and development. You want all the documents that include those words. Typing “research AND development” into the search box will find any document that includes both of those terms—whether in the title, the document text, or the metadata. (Note: In SharePoint’s KQL, a space is equivalent to “AND” and typing “research development” is technically the same thing as typing “research AND development.”)
- OR: Typing “research AND development” into your SharePoint search finds any document that contains both words, though not necessarily in sequence or as a phrase. Typing “research OR development” will find all documents that contain either word. A file that includes the word “development” but not the word “research” would come up in this search. You might also type “research AND development OR R&D” to find instances where keywords might be written in different ways or used interchangeably.
- Quotation Marks: Above, we used quotation marks to denote search queries, not to imply that the searcher would include quotes in his or her search. However, if you do search using quotation marks, that means you are searching for a specific phrase. For instance, if you search “research and development” WITH the quotes, SharePoint will search all files that include that exact phrase.
- NOT: Using the word “NOT” in a search will exclude all files that contain the following word from your search results. For example, if you type “NOT marketing” into your search, SharePoint will filter out any search results that include the word “marketing.” A minus sign before the word you want to exclude works in the same way.
- Asterisk: Using an asterisk in your SharePoint search means using a wildcard. Say you want to find all documents that include any variation of the word “manager,” including “manage,” “managing,” “management,” and “managers.” To avoid typing a long list of words with OR in between every single one, you would just type “manag*” and SharePoint would find all documents with words that start with those five letters.
Note: When using the KQL keywords, they must be typed in all caps: AND, NOT, OR.
In addition to using these words and characters to improve your SharePoint search, you can also specify properties. Say you know you are looking for a document that is of the PDF format. You would type “filetype:pdf” to filter out all other filetypes. The colon in this context means “equals.” You can use this same tactic to find files that match specific dates (especially years), files with specific authors, files where you know some or all the title, and more.
You can also use negative qualifiers or more complex operations to tell search what to do. Say you know the file isn’t a PDF. You can type “filetype<>PDF” to denote “filetype does not equal PDF.” Other options include:
||Greater than or equal to
||Less than or equal to
As you might expect, there is more to learn about SharePoint’s KQL, from how you should type in date and time queries to specifying property values. Click here to read Microsoft’s tutorial on KQL.
Depending on what you’ve configured in the search schema, you will also be able to filter these searches even further using views, refiners, indexed columns, and filters. Your refiners—which could be anything from dates to authors to filetypes—will appear alongside your search results. You can then tweak the refiners to narrow your searches further. This fine-tuning can sometimes be easier than typing everything you can think of into the search bar.
Aliases are Your Custom Search Keywords
In previous blog posts we discuss creating aliases for your managed properties, and as you build a library of aliases, make sure your users are aware of them. They become additional keywords that can be used for searching. For example, if you have “inv” for invoice number, you can type “inv:12345” to filter your search against that managed property. You can provide your user base a list of aliases by adding an HTML web part to the search results page for handy reference.
Learn How to Search in SharePoint by Working with 2Plus2
Knowing how to search in SharePoint with by using KQL and other strategies will go a long way toward easing some of the common strains of SharePoint navigation.
With that said, you will never get the most out of SharePoint search unless you go through and do all the things we discussed in the first few blogs of this series. You need to set up content types and managed metadata using the term store. You need to build a faceted search function using managed properties and refiners. You need to create custom views and index columns that you use a lot to browse documents. You need to go into the search schema and make sure that the properties you want to search aren’t just crawlable, but also indexed.
At 2Plus2, we can show how to search in SharePoint. We can work with you to put everything together, from managed metadata all the way to KQL and advanced search. We know that finding documents in your SharePoint document libraries can sometimes be tough and we want to make it easier. Go online to schedule a free consultation with our team or call 510-652-7700 today.