The query box, also referred to as the
small search box, is generally the first place a user can go to interact
with search. In a standard deployment, the query box can be found in
the upper right quadrant on any site outside of a search center.
Examples of where the query box can be found include the home page, site
collections, sites, subsites, team sites, and lists. Depending on the
customizations done, the search center may be found in other locations
on a page or can be found worked into various Web Parts. Unless the
design of a site has been customized, the query box can be found in the
location shown in Figure 1.
Figure 1. The SP2010 query box
The query box provides a free text field for
entering search queries. In SharePoint 2010, the query box can be used
to enter search queries for documents, people, sites, lists, and any
other items found in crawled content sources. By default it is set to
search the site the user is currently on, but depending on the
configuration of the query box, and whether the administrator has made
the scope picker available, the query box can be set up to search
against any available site or site collection.
These settings have been made to provide a thorough
overview of the standard search features made available in SP2010.
Although not automatically enabled with the deployment of a search
center, these customizations are simple and standard to many
deployments. They do not require any special custom development and can
be easily enabled through the site settings.
The query box can accept the standard search
syntax used throughout all search fields in SP2010. Unlike MOSS 2007,
SP2010 supports advanced query syntax. Although not necessarily the most
efficient place to build complex search queries, the query box can, in
fact, execute all of the same search parameters as the Advanced Search
page found on a search center.
When users enter search queries in the query box
and execute the search, they are redirected to a search results page
with items relevant to the executed search returned. The returned search
results are provided based on the entered query, scope, and user
permissions. The search center the query box routes to is established by
the chosen scope. The user can then interact with the search results as
if the search had been executed through a search center. As stated
earlier, if the default scope is used, the search results will return
results only from the site the user was on when he or she executed the
query. To search against a broader range of sites, the user needs to
select a different scope, navigate higher in the site hierarchy, or
execute the query through the search center. Searches entered through a
query box without a different site selected will return results similar
to those shown in Figure 2.
Figure 2. Site search results
Taking Advantage of the Scope Picker
To broaden or sharpen a search through the query
box, the scope picker can be used. Scopes are set up by administrators
and provide options for the application of pre-determined rules to a
search. The most common application of scopes is to specify a target
site or site collection, but scopes can also be used to select different
search pages such as People search, as well as a combination of other
parameters, such as those found on the Advanced Search page. Scopes are
not generally created on the fly, but instead are created by the site
administrator for the most commonly needed search parameters.
When available, scopes are accessed through a drop-down to the left of the query box as shown in Figure 3.
By default, the site currently being accessed is chosen. To change the
scope, click the drop-down and select the desired scope. When a scope
for a different site or site collection is chosen, the executed query
will return results outside of those available only through the current
site.
Figure 3. Search scopes and the query box
When the search is executed, the target site or site collection will be listed next to the search query above the results (Figure 4).
Figure 4. Search scopes and the results page
After a result set
is returned, the capability to change the selected scope or query is
made available. By selecting a different scope and executing a different
query, a new set of results will be returned. This provides the ability
to change search parameters as needed without navigating back to the
originating site or site collection.