Skip to main content

Patrick Tisseghem's Blog [MVP SharePoint]

Go Search
U2U Blog Center
U2U website
  

The Happy SharePoint Traveller

U2U Blog Center > Patrick Tisseghem's Blog [MVP SharePoint] > Posts > Nope, no wildcard search support out-of-the-box with MOSS 2007
Nope, no wildcard search support out-of-the-box with MOSS 2007

Do you know the number of times I got the question: what do we have to do to enable wildcard search in the Search Center with MOSS 2007? This week also, with the MS folks in my course, search and the customization was leading to a lot of discussions. And I got challenged again with the question. So I decided to drill down into it a bit more and talk to my good friend Lars from Mondosoft - the leading search company in Europe and probably in the world. Here is my conclusion, a harsh one for everybody that was looking for the easy change as was the case with SPS 2003: 'wildcards are not possible without either buying Ontolica Search or investing in a deep (read development extensive) customization of the search center'. The reason for this is that your search query is executed by a hidden object (Microsoft.Office.Server.Search.WebControls.SearchResultHiddenObject) that you do not have access to. This will translate the query to a keyword syntax query execution by default unless you go to the advanced search page. A query initiated here will result in the use of the full text sql query syntax (making use of a lot of undocumented fields). And no, no intervention possible. No easy way of changing the template used by this object for executing the query.

I don't understand the reasons behind this that much. There are numerous properties exposed by the different Web parts. Was it so difficult to expose one more: Enable wildcard search where they internally replace the FREETEXT part with a CONTAINS part? Well, nope. Maybe somebody in Redmond can explain this more what the reasons were. Anyway, it is very very good news for Lars and his company Mondosoft because they are back in business :) (they would have been even if wildcard search was supported OOB). And to tease you to buy their new release of Ontolica Search, they are going to offer a free community version of it, and guess what, it will enable wildcard search!!! Good job guys, can't wait to see you in Berlin for the first public demonstration of the new product!

Update: It seems I raised some eyebrows on the other side of the ocean. Don't worry, I hoped it was going to. It all is going to end up with positive information. Lawrence wrote me to explain the support in the keyword syntax. Fair enough but not good enough for a customer I am afraid. And when you read the title of the posting, please know that 'out-of-the-box' for me is equal to 'directly available or easy to turn on or customize'. So, yes MOSS supports wildcards, but not in an easy way.

  • OOTB with the keyword syntax we don’t have full wildcard support. We do have prefix match, on property queries in the keyword syntax. However, it is not possible to query for a prefix on a multi-term.For example, you can submit the query author:Lawr and match on author=Lawrence. But you cannot specify author:(Lawrence L) and hope to match on all the people with a first name Michal and last name that start with “L” because we don’t have the equivalent of parenthesis
  • With a custom web part, using the SQL syntax, you can perform wildcard searching (you can use suffix wildcards in the contains clause, or you can use a slow LIKE clause with any wildcards for additional property matching). Note that replacing the freetext with contains will influence the ability to order by rank.

Comments

How basic is this omission?

We've just hit this problem, and while it seems like a relatively small issue, I'm guessing that it must be because the folks at MS only search for users with short, easy to spell names.  Like 'Bill' perhaps? When searching for people, I'll go about 5, maybe 6 letters, then I want results dammit! Typing firstname:abcd just isn't gonna make me happy when I know I could write a very simple SQL CONTAINS query, if only I could attach that to the hidden object.  Grrrr. MS partiatially sold me on this product because of the bells and whistles of search, so it certainly tarnishes my perception of MOSS.
at 1/03/2007 6:07

Microsoft messed up with this

We have just rolled out a new intranet using MOSS2007 and the main source of problems is that people can not do wildcards searches.  I agree with above comment this is a MAJOR omission. It's something MS should fix with a patch.
at 9/03/2007 12:51

Mondosoft shipping a wild card search web part for free

It should be release shortly (or may already be released): http://www.ontolica.com/Ontolica%20for%20MOSS%202007/Ontolica%20Wildcard.aspx 
at 3/04/2007 20:19

Mondosoft shipping a wild card search web part for free

It should be release shortly (or may already be released): http://www.ontolica.com/Ontolica%20for%20MOSS%202007/Ontolica%20Wildcard.aspx 
at 3/04/2007 20:19

Mondosoft shipping a wild card search web part for free

It should be release shortly (or may already be released): http://www.ontolica.com/Ontolica%20for%20MOSS%202007/Ontolica%20Wildcard.aspx 
at 3/04/2007 20:19

out of the box in MOSS2007

out of the box in MOSS2007
at 20/04/2007 13:44

out of the box in MOSS2007

out of the box in MOSS2007
at 20/04/2007 13:44

Rationale

I agree, the rationale M$ uses for not including a simple checkbox solution for wildcard searching is baloney.  "Affects ability to rank!?"  Who gives a rat's rear?  I'll take wildcards over ranking any day.  My end-users don't care, they want to be able to type "child" and come up with "children's stories," "child-rearing," "childlike" or you name it.  How stupid that I have to BUY something to get to some 'hidden' code.
at 31/07/2007 18:30

Rationale

I agree, the rationale M$ uses for not including a simple checkbox solution for wildcard searching is baloney.  "Affects ability to rank!?"  Who gives a rat's rear?  I'll take wildcards over ranking any day.  My end-users don't care, they want to be able to type "child" and come up with "children's stories," "child-rearing," "childlike" or you name it.  How stupid that I have to BUY something to get to some 'hidden' code.
at 31/07/2007 18:32

Problem with Ontolica Wildcard

It messes up my BDC application. I guess i would have to rewrite something for search in the BDC ADF??
at 3/09/2007 12:21

http://www.ramonscott.com/Home/tabid/37/EntryID/1/Default.aspx

It is possible by a simple workaround.
at 2/11/2007 12:58

There is a way!

at 30/07/2008 4:38

the second link was supposed to be...

at 30/07/2008 4:45

Phrase ending search

Hi,
I need to know, if it is possible to search phrase endings in anyway in SharePoint, and a hint how to do it.. I have heard (and basically tested as well) that CONTAINS clause is not a solution.
If I had a string 984395857883 and tried to search for *883 in MOSS - can I do it at all?

regards,
at 22/09/2008 15:32
Captcha

Enter the code shown above: *

(Note: If you cannot read the numbers in the above
image, reload the page to generate a new one.)