Search for content

There are several ways to search for content in a site. You can use the Search box that is on each page of a site, or the Search Center site. You can look for content by searching for keywords, a specific phrase enclosed in quotation marks, or by values that are assigned to properties.

What do you want to do?


Search for text or files on a site

When you are looking for content, but are not sure where it is located, start your search at the top site in the site hierarchy where you think the information might reside. You can then refine the results in order to find the information. You can look for content by entering keywords or a specific phrase enclosed in quotation marks. For more information about creating queries, see the section Write effective queries.

  1. Go to the site you want to search. Site search results do not include content on a parent site or on adjacent sites. Make sure you're at the top site in the site hierarchy for the search results you want.
  2. In the Search box, type the word or phrase that you want to look for, and then click the Search button.
  3. By default, search results are displayed by relevance. To sort the results differently, click an option under Refine Results. You can also enter a new keyword search change the scope to This List. Doing so will restrict future queries to the first set of results. If you enter a new search with the scope set to This Site, a new search will occur from the same site or sites as the original query. For more information about working with search results, see the section Work with search results.

 Notes 

  • Attachments to list items do not appear in search results.
  • The Search box is limited to a maximum of 255 characters.

Top of Page Top of Page

Search for text or files in a list or library

When you are sure that the content you are looking for resides in a list or library, start the search on the page where the list or library resides. Search results allow you to refine your search by metadata, such as the author of the document or the date that it was written. You can look for content by entering keywords or a specific phrase enclosed in quotation marks. For more information about creating queries, see the section Write effective queries. If you don't find the content you want, try searching from a site or using different keywords.

  1. Go to the list or library that you want to search.
  2. In the search box, type the word or phrase that you want to look for, and then click the Search box.
  3. By default, search results are displayed by relevance. To sort the results differently, click an option under Refine Results. For more information about working with search results, see the section Work with search results.

 Notes 

  • Attachments to list items do not appear in search results.
  • The Search box is limited to a maximum of 255 characters.

Top of Page Top of Page

Find content from a Search Center site

Your organization may use a Search Center site. The Search Center site is the place to go when you want to find enterprise-wide results. The default Search Center site displays a Search box where you can type your query.

  1. To display the Search Center site click Search Center in the navigation links near the top of most pages.
  2. If the Search Center site includes links, click a link to search in certain locations or to find People. For example, click All Sites to search for content on every available site.
  3. Type a query in the Search box.

 Note   For more information about writing queries, see the section Write effective queries.

  1. Click Go Search to display the search results.

Top of Page Top of Page

Write effective queries

Whether you search from a site or the Search Center constructing an effective query can result in quickly finding the information you want. You can use a combination of free text, phrases, logical operators, and property-based restrictions look for information or people.

Here are some things to keep in mind when writing a query:

  • Separate search terms with spaces     The search results will list all content containing all of the words in any order.
  • Search ignores capitalization    A search for Author:John has the same results as a search for author:john.
  • Use quotation marks for exact results     When you are sure that the document you want contains the exact words in the exact order of your query, put the query in quotes. Otherwise, it is best to leave the phrase unquoted. For example, a query for this article, Search for content will find only those articles where "search" AND "content" are together.
  • Number of characters     A query must be no longer than 255 characters.

Add Boolean logic to a query

Now that you know about the basics of search, you might want to add some parameters to make your search results more specific. SharePoint allows you to use Boolean logic to keywords and properties, which means connecting them with the operators AND, OR, NOT, + (PLUS), and - (MINUS) to construct a meaningful query. Use the following examples to help create successful queries.

Logical operator Description and example
AND Use to find all words documents, regardless of their relationship. For example, apples AND oranges finds all documents containing both apples and oranges, but the two terms might not be concurrent in the documents.
OR Use OR to find all documents containing either word or words. For example, a search for C++ OR C# finds all documents containing either of those programming languages.
NOT Use NOT to exclude certain results. For example, marketing AND forecast NOT budget will return documents containing the keywords marketing and forecast, but not budget.
+ (PLUS) The query SharePoint+Excel will return all documents containing both keywords.
- (MINUS) The query SharePoint+Excel -Excel 2007 -Excel 2003 will return all documents containing keywords Excel 2003 and Excel 2007.

In addition to logical operators, SharePoint allows the use of relational operators. You can construct a query by using the following values:

Relational operator Description and example
: Colon Use with a property to specify equality. For example, Author:Smith means the author equals Smith.
= Equal to Use with a property to specify equality. For example, Author=Smith means the author equals Smith.
< Less than Use with dates and integers to specify less than. For example, search specs modified<7/8/09 will return all search specifications that were modified before July 8, 2009.
> Greater than Use with dates and integers to specify greater than. For example, search specs modified>7/8/09 will return all search specifications that were modified after July 8, 2009.
<= Less than or equal to Use with dates and integers to specify less than or equal to. For example, search specs modified<=7/8/09 will return all search specifications that were modified before July 8, 2009 inclusive.
>= Greater than or equal to Use with dates and integers to specify greater than or equal to. For example, search specs modified>=7/8/09 will return all search specifications that were modified after July 8, 2009 inclusive.
.. two dots For example, property: value 1..value 2 indicates that the property is greater than or equal to value 1 and less than or equal to value 2.
<> (not equal to) Use with dates and integers to exclude. For example, search specs modified<>7/8/09 will return all search specifications that were not modified on July 8, 2009.

Query using properties

You can construct queries using properties, which are the metadata on documents saved in SharePoint. The author of a document or the date it was saved is an example of a property. Content properties and their values are stored when sites are indexed. When you have specific information about the properties of an item, you can use it to help construct a query to find the item.

When you create a search using properties, do not use spaces between the property and the value.

Search on property values Use the syntax property:value. For example, author:smith finds all documents authored by a person whose name is Smith.
Search by filename Type filename:"Budget" (with quotation marks) to find a file named "Budget.xlsx," or type filename:budget (without quotation marks) to find both "Budget_Current.xlsx" and "Budget_Next.xlsx."
Search by file type Suppose that you are looking for budget spreadsheets that have the file type .xlsx. Append filetype:xlsx to your query to display only search results that are Excel 2007 and Excel 2010 workbooks.
Wildcards Use an asterisk "*" for a prefix match with a keyword or property to find documents. For example, a search for Author:Smi will return all documents written by an author whose name begins with the letters Smi.
Search on different properties The search service interprets the space between terms that use different properties as an AND. For example, if you search on title:budget filetype:xlsx, your search will return only Excel 2007 or Excel 2010 workbooks with titles that begin with the word "Budget."
Exclude certain search results To exclude search results that contain certain terms, use a minus sign (-) before the term that you want to exclude. For example, if you want to find items that include the word "expenses" but do not include the word "taxes," type expenses -taxes in the Search box.
Append file properties Use properties to specify the name or type of file to return. For example, if you want to find Microsoft Office Word files that include the word "schedule," type schedule filetype:docx in the Search box.
Search for alternate values for the same property The search service interprets the space between terms that use the same property as an OR. For example, if you search on author:"John Smith" author:"David Jones", your search will return items that were created by either person.
Exclude property values To exclude content that is marked with a certain property value, use a minus sign (-) before the name of the property.
Focus on a particular server

If the site property is available for searches, you can append site:servername to your query to focus your search on content that is stored on a particular server.

 Note   Backslash characters (\) do not work in queries. Therefore, do not use backslashes for a server path when you type the site:\\servername.

Date/time Any date/time property in any format can be used with relational or logical operators to form a query. For example, search specs modified=7/8/09 will return all search specifications that were modified on July 8, 2009.

 Notes 

A query must include at least one term to find. Queries that consist only of terms to exclude will produce an error message.

If you cannot find documents that you know are in your organization, check for permissions on the documents, or add or change keywords or properties for the documents.

Top of Page Top of Page

Work with search results

By default, core search results are sorted by their relevance to your query. Keyword definitions and Best Bet links (if any) are featured at the beginning of your search results. You can refine the results by clicking any of the links in the refinement panel.

You can refine search results based on filtering options such as author, the date or range of dates, or whether the result should display from a particular site. One click on any of the items in the refinement panel immediately presents the results based on the option you choose.

 Note    Your site collection administrator can change the options that show up in the refinement panel. If you don’t see the option you are looking for, contact your site collection administrator.

Another method of refining your search is by using scopes. If you arrived at the search result page by using the Search Center or by searching from a site, then you will see the option to refine the results by This Site or This List. Choosing This List allows you to further refine the results by a new set of keywords or a phrase. You may also have the People or All Sites scope from which to choose.

Top of Page Top of Page

 
 
Applies to:
SharePoint Online for professionals and small businesses