in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

For The User

A blog for SharePoint users. If you are a SharePoint administrator or developer, feel free to read on but be warned I'll be covering stuff that may seem pretty basic to you. It's been my experience that getting started with and getting the most out of SharePoint as an end user isn't always an intuitive process. My goal is to provide information and content in the hopes of smoothing your path to becoming a master SharePoint user.

Wildcards? We're not playing poker!

Lame title, I know.  But I'm pressed for time, so please bear with me Smile

Anyways, I wanted to take a quick second to point out something that is missing from Search in WSS v3 and MOSS 2007: wildcards.  If you already know what a search wildcard is, feel free to skip ahead to the next paragraph.  Wildcards are characters you use in a search query to signify that any content can be returned in its position.  So let's say I wanted to find all the .JPG files in a folder on my Windows workstation.  From a search in Windows Explorer within the target folder, I can type "*.JPG", and that query will return all the .JPG files in that folder, regardless of their name.  The asterisk (*) is the wildcard in my query, it represents all characters in the filename of the images.  If I searched for "john*.jpg", that query would only return the files that started with "john" and ended with ".jpg".

Often times in search engines, wildcard functionality is included inherently with your queries.  That means that if you search for ".jpg", the engine will return all records containing that string somewhere in their name, instead of only files explicitly named ".jpg".  This is pretty handy, especially when you don't know exactly what the file you're looking for is named. 

However, the SharePoint search engine in WSS v3 and MOSS 2007 does not use wildcards at all.  It does not implicitly include wildcards in searches, and if your query string reads "*.jpg", it will only look for files named ".jpg".  It will not return all the .JPG files in the search target.  So keep this in mind when you're running your searches.

NOTE: If you really need to use wildcards in your SharePoint searches, there is an alternative available to you.  Mondosoft has made the wildcard functionality of their Ontolica SharePoint search product free to anyone who wants it.  You can get it here: http://www.ontolica.com/Download/Request%20Product.aspx?prod=onwi 

I'd also like to thank Rob Bogue of Thor Projects and Leo Doyle of Mondosoft for pointing out this issue.

Comments

 

tibballs said:

It is possible to have some sort of 'wildcard' search by creating your own custom advanced search webpart which works the same way as searching on a property on the Advanced Search page.

Creating a webpart that does this will work with the existing search result webparts.

The main problem is this is that it will always do a prefix and suffix 'wildcard' search meaning that if you do a property search on Title = 'test' then the SQL syntax would look like Title LIKE '%test%'.

November 7, 2007 4:48 PM
 

ferringer said:

Adam --

That's an excellent point, but you're right about the limitations.  With that approach users wouldn't be able to nest wildcards in their queries (john%.jpg).

I think that thanks to the strong extensibility of the current SharePoint releases, it's definitely possible to develop your own custom search front end that would include wildcards.  The question that needs to be addressed is whether or not it's a good investment for your organization to do so.  

I would highly recommend making the same evaluation around using a third party product such as Ontolica or its competitors.  It's all too easy to fall in love with an add-on product for SharePoint without taking a look at the additional overhead that comes with its use.  

That being said, everyone's situation is different and its always great to be aware of other possible solutions to common problems.  Thanks for the info!

John

November 8, 2007 9:33 AM
 

davidinark said:

Wildcard searches should be an out-of-the-box feature.  Back in the days of Frontpage and ASP, I had created a very simple checkbox solution.  If the user did not want wild cards, they simply checked the "exactly" box.  I am no programmer, and if I can do it in stupid ASP, then Microsoft can add the same functionality in Sharepoint. Period.  It should not require some 3rd party add-on, free or not!

November 12, 2007 1:25 PM
 

ferringer said:

David --

Not to pour salt in the wound, but the crazy thing is that the MOSS search engine actually supports wildcard searches, so I am actually misspeaking a little in my post.  It turns out it's the Search UI that doesn't support wildcards.

Apparently there is an entry in one of the SDKs which covers how to do wildcards in the current version of SharePoint.  The really frustrating thing is that you'd have to build your own custom search web part in order to take advantange of the functionality.  But it was left out of the default Search UI, for what sounds like performance concerns.  To me, this feels like a pretty major omission, but I guess it's good for the third-party providers out there.

Thanks,

John

November 12, 2007 2:37 PM

Leave a Comment

(required )  
(optional )
(required )  
Add

About ferringer

John is a Solutions Architect for Apparatus, Inc. in Indianapolis, IN, with over four years of experience administering and supporting SharePoint technologies and has spent over nine years working in the technology consulting industry. He is a Microsoft Certified Technology Specialist in the installation and configuration of Windows SharePoint Services (WSS) v3, Microsoft Office SharePoint Server (MOSS) 2007, and Microsoft System Center Operations Manager (SCOM) 2007. Previously he was a Senior Consultant for Accenture, where he designed and developed custom applications, managed small teams, and trained new resources in both technical and procedural practices.

Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts