Wednesday, May 2, 2018

Search for content

Search for content

There are several ways to search for content in Microsoft SharePoint Server 2010. You can use the Search box that is on each page of a SharePoint site, the Search Center site, or create a detailed query by using the Advanced Search page. 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

Search for text or files in a list or library

Find content from a Search Center site

Write effective queries

Work with search results

Find content by using Advanced Search

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 highest site 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 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

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 button.

  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

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 or Enterprise 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.

  4. Click Go Search to display the search results.

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

Returns results where the value specified in the property restriction is equal to the property value that is stored in the Property Store database, or matches individual terms in the property value that is stored in the full-text index.

= Equal to

Returns search results where the property value is equal to the value specified in the property restriction.

Note: We do not recommend combining the = operator together with asterisk ( \*) when you do exact matching.

< 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 were prepared in Excel 2007. Append filetype:xlsx to your query to display only search results that are Excel 2007 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 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 2007 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 your administrator has mapped properties such as writer or e-mail to the managed property author, your results might also include content that contains these properties.

If you cannot find documents that you know are in your organization, you may need to work with your search services administrator to have the documents added to the search index, enable permissions on the documents, or add or change keywords or properties for the documents.

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.

Your administrator can change the options that show up in the refinement panel, but an example of how you might choose to refine the search results is by the site where you think your document resides, the author or authors you're interested in viewing, or by the date or range of dates the document or documents were written. One click on any of the items in the refinement panel immediately presents the results set by refinement method you choose.

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.

Search also suggests a list of related searches. A simple click on one of these links immediately executes the query for text or a phrase that is similar or related to your original search.

If your organization enables people search and My Sites, you are offered a list of people in your organization who have listed the search word or phrase in their profile. Click the name of the person to go to that person's My Site. For more information about searching for people, see the article Search for people.

The search results page also displays Did you mean? suggestions above your search results. This feature suggests alternate queries that you can try. Each suggestion is formatted as a link. To search again on an alternate query, just click on it.

Top of Page

Find content by using Advanced Search

If you need to construct a more specific query, you may want to use the Advanced Search page, which is available from the search results page. By using Advanced Search you can choose to display or exclude results that include certain words, filter search results by language or type, and search on content properties. One disadvantage of using Advanced Search is that by using too many parameters or restrictions the query can slow down performance. As with any search query, use as few words or restrictions as possible to widen the results and then narrow the results by refining them.

  1. To display the Advanced Search page, click the Advanced link next to the Search box on the search results page.

  2. Under Find documents with, type words or phrases in the fields that are shown in the following illustration. You can choose to match each word, every word, an exact phrase, or to exclude results that include certain words.

    Adv Search - Find documents with

  3. To narrow your search results by language, select one or more check boxes next to Only the language(s).

    Adv Search - Only the language(s)

  4. To narrow your search results by document format, click an option from the Result type list.

    Adv Search - Result type

  5. To find content that is marked with certain values, use the fields beside the heading Where the Property. Click a property from the Pick Property list, choose a logical operator, and type a value that you want to search for. Click Add Property to search on more than one property, or on another value for the same property. In the following example, the search results will display items authored by Mike Smith that contain the term "Budget" in the name.

    Adv Search - Add properties

  6. Click Search to display your search results.

Top of Page

No comments:

Post a Comment