WEBSITE

Sharepoint 2010 : The Search User Interface - The Advanced Search Page (part 2) - Picking Property Restrictions

11/7/2013 3:21:20 AM

Picking Property Restrictions

The section “Add property restrictions…” allows for the ability to create strings of property restrictions from a series of two drop-down boxes and a free text field. Using this option, users can string together queries with several property restrictions without learning how to enter them into the search box. Just like a property restriction entered as query syntax, each property restriction has three sections, which include the property name, the property operator, and the value. When multiple property restrictions are built into the advanced search, a fourth field, which allows for restrictions to be combined using the AND operator or the OR operator, appears. To add or remove additional property restrictions, simply select the + or − icon to the far right of the property restriction.

The first drop-down after the phrase “Where the property…” is labeled “(Pick Property)” and allows the user to choose the property that will be restricted (Figure 4). By default, the properties shown in the following figure are available when searching all result types. Additional properties are made available depending on the selected result type.

Image

Figure 4. Pick Property options

The second drop-down allows the user to select the operator to be used in the property restriction. Depending on the selected property type, the available operators will change. If the property is a text, or string, then the “Contains”, “Does not contain”, “Equals”, and “Does not equal” operators will be available. If the property is an integer, then “Equals”, “Does not equal”, “Greater than”, and “Less than” operators are available. If the property is a time or date, then the “Equals”, “Earlier than”, and “Later than” operators become available. Table 2 lists the available operators and their corresponding symbol for use in search query syntax.

Table 2. Advanced Search Property Restriction Operators

Field Title Operator
Contains:
Does not contain < >
Equals=
Does not equal NOT
Greater than >
Less than <
Earlier than <=
Later than >=

The last field is a free text field where the user enters the desired value of the property restriction. Depending on the property type, the values that will return results greatly differ. Author, Description, Name, URL, Created by, and Last Modified By property types will all accept text strings. The Size property type will accept a numerical value in bytes by default. The Last Modified Date property will accept a numerical date in the form DAY/MONTH/YEAR or MONTH/DAY/YEAR depending on how the SharePoint 2010 DateTime field is configured. This allows for flexibility in global deployments.

Query Examples on the Advanced Search Page

Some of the examples of property restrictions found in the previous section on search query syntax can be found in the following screens. Figure 5 provides an example of utilizing the author property with the equals and OR operators. This search will return results with the authors Josh Noble, Robert Piddocke, and Dan Bakmand Mikalski. This is equivalent to the search query author:"Josh Noble" author:"Robert Piddocke" author:"Dan Bakmand Mikalski".

Image

Figure 5. Configuring a query to return only items authored by Josh Noble, Robert Piddock, or Dan Bakmand Mikalski

The parameters in Figure 6 will return results for Word documents over 50MB (52,428,800 bytes) authored by Josh Noble. This search is equivalent to the query author:"Josh Noble" AND filetype=docx AND size>50MB.

Image

Figure 6. Configuring a query to return only Word documents over 50MB authored by Josh Noble

The search in Figure 7 will return results for any English PowerPoint presentations, no matter the extension, that contain the phrase “SharePoint Search Expert”. This search is the equivalent of entering the query (DetectedLanguage="en") (FileExtension="ppt" OR FileExtension="pptx" OR FileExtension="pptm" OR FileExtension="odp") AND SharePoint Expert.

Image

Figure 7. Configuring a query to return only English PowerPoint presentations containing the phrase “SharePoint Expert”

For users that would like to learn the available search query syntax and become less reliant on the Advanced Search page, try this.

Build a search query in the Advanced Search page. Make sure to include the property restrictions and keyword syntax you would like to learn how to enter manually. Execute the search and take note of the content produced in the search field at the top of the search results page. Figure 8 shows an example of part of an advanced query syntax that would be produced by specifying a scope, last modified date, and file extension on the Advanced Search page.

Image

Figure 8. Advanced search syntax after a query from the Advanced Search page

This search syntax also contains all of the keywords, property, and scope restrictions built into an advanced search query. This syntax can also be entered into any SharePoint search field to reproduce the same results. The syntax is also useful to learn the structure of search strings, operators, and property restrictions. Taking note of this syntax will guide your knowledge of the search syntax through repetition. Eventually, you will not need to navigate to the Advanced Search page for your commonly entered expressions.

Other  
  •  Sharepoint 2010 : The Search User Interface - Search Query Syntax - Property Restrictions
  •  Sharepoint 2010 : The Search User Interface - Search Query Syntax - Search Query Operators
  •  Sharepoint 2010 : Creating a Workflow Using SharePoint Designer
  •  Sharepoint 2010 : Creating a Workflow Using Visual Studio 2010 - Using the Visual Studio Workflow Designer (part 2)
  •  Sharepoint 2010 : Creating a Workflow Using Visual Studio 2010 - Using the Visual Studio Workflow Designer (part 1)
  •  Sharepoint 2010 : Creating a Pluggable Workflow Service (part 6) - Calling a SharePoint-Hosted WCF Service
  •  Sharepoint 2010 : Creating a Pluggable Workflow Service (part 5) - Calling a WCF Service, Receiving WCF Messages , Raising Events in a Workflow Service, Configuring Pluggable Workflow Services
  •  Sharepoint 2010 : Creating a Pluggable Workflow Service (part 4) - Using the ExternalDataExchange Attribute, Deriving from SPWorkflowExternalDataExchangeService
  •  Sharepoint 2010 : Creating a Pluggable Workflow Service (part 3) - Hosting an .svc File in SharePoint, Token Replacement in Visual Studio , Adding WCF Service Configuration to SharePoint
  •  Sharepoint 2010 : Creating a Pluggable Workflow Service (part 2) - Add a SharePoint-Hosted WCF Service
  •  
    Top 10
    Review : Sigma 24mm f/1.4 DG HSM Art
    Review : Canon EF11-24mm f/4L USM
    Review : Creative Sound Blaster Roar 2
    Review : Philips Fidelio M2L
    Review : Alienware 17 - Dell's Alienware laptops
    Review Smartwatch : Wellograph
    Review : Xiaomi Redmi 2
    Extending LINQ to Objects : Writing a Single Element Operator (part 2) - Building the RandomElement Operator
    Extending LINQ to Objects : Writing a Single Element Operator (part 1) - Building Our Own Last Operator
    3 Tips for Maintaining Your Cell Phone Battery (part 2) - Discharge Smart, Use Smart
    REVIEW
    - First look: Apple Watch

    - 3 Tips for Maintaining Your Cell Phone Battery (part 1)

    - 3 Tips for Maintaining Your Cell Phone Battery (part 2)
    VIDEO TUTORIAL
    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 1)

    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 2)

    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 3)
    Popular Tags
    Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8