Connect with Us
Blog: Do More With Search

SharePoint 2010 Search New Query Syntax: Wildcards and Boolean Operators

Written by John Ross on . Posted in Guest Industry Experts, SharePoint 2010, Understanding Search

One of the most common complaints about SharePoint search in MOSS 2007 was the inability to use Wildcards and Boolean Operators when performing search queries.  Both of these capabilities were supported by the search API but required either custom code or 3rd Party Search Utilities to take advantage of this. 

The good news is that SharePoint 2010 now supports both Wildcards and Boolean Operators when performing search queries!  What does this mean? 

Wildcards

Let’s start with the Wildcards.  It means that now you can enter a query like this directly into the search box:

share*

This would return results that had keywords that started with “share” – it is very useful when you don’t know the exact spelling of something or you couldn’t remember the exact name of a keyword.  Also, with the new addition of the refinement panel you could start off with a very broad wildcard search and then refine your results to quickly get exactly the results you are looking for. Wildcard searches can be used in property searches as well – the example above is very simplistic but you could combine terms or property searches as needed.  For example this search would search on the Author Metadata property and return all results that started with John:

Author:John*

Boolean Operators

SharePoint 2010 Search now also supports Boolean Operators.  This means that you can now use things like “AND”, “OR”, parenthesis, =, >, <, <=, >= 

Here’s an example of the type of query you could run using the new syntax:

(“SharePoint Search” OR “Bing”) AND (title:”Keyword syntax” OR title:”Query Syntax”)

Boolean Operators have been around for a while but are usually only used by search power users. While wildcard searches allow users to do very broad searches, Boolean Operators allow users to do very specific searches so they can quickly find the results they are looking for that meet their search criteria.

Summary

With SharePoint 2007 the options for performing broad or specific searches were limited – although users could use the Advanced Search box it was confusing to many users.  This new syntax provides users with more options for finding content more quickly and efficiently.

Tags: ,

Trackback from your site.

John Ross

John Ross, SharePoint Server MVP, has more than eight years of experience implementing solutions for clients ranging from small businesses to Fortune 500 companies as well as government organizations. He has worked with all project phases from analysis to implementation and has been involved with a wide range of SharePoint solutions that include public facing Internet sites, corporate intranets, and extranets. John is co-author of the books, “Professional SharePoint 2010 Branding and User Interface Design”and “Real World SharePoint 2010: Indispensable Experiences from 23 SharePoint MVPs” from Wrox. Visit his blog or follow his SharePoint adventures on twitter@JohnRossJr

Comments (1)

  • Joe

    |

    Hi John,

    I am trying to do some searching in sharepoint 2010 and whenever I use the OR operator i get “Your query is malformed. Please rephrase your query” I thought maybe I was doing something wrong so I did a google search and found your blog. I tried to copy your sample query above to see if it works and it gives me the same error. Does your query above work for you? Do you know of a resource available to test boolean search capabilities in sp2010?

    Reply

Leave a comment