How To Figure Out SharePoint Portal Server 2003 Full-text Query Syntax

It has come to my attention that at this time there are no real documents out there (at all - even internal to Microsoft) that discuss the ins and outs of querying SPS 2003 via the search web service and fulltext search queries. Nobody seems to have the magic answer as to how to formulate the query - what you can SELECT, what goes in the WHERE clause, etc.

I don't have the answer, but I know how you can get a jumpstart on figuring out how it works.

On the SharePoint Portal Server 2003 "advanced search" page (the one that allows you to search over document metadata), do a search. Once you get the results you want, do a "View Source." Scroll down near the bottom (or search for "SELECT" - match the upper case letters, too) and check this out: They embed the entire SQL full-text query right in the page.

Apparently that's how the MS guys figure out how the thing works; if it works for them, it should work for you, too. Good luck!

Print | posted @ Friday, June 18, 2004 12:53 PM

Comments on this entry:

Gravatar # Re: How To Figure Out SharePoint Portal Server 2003 Full-text Query Syntax
by Niklas E at 12/1/2004 1:37 AM

The documentation I have found is for old Index server or SPS 2001. It seems like they forgot about SPS2003 documentation.

View source is a nice way to get some information, but still not very useful in the more advanced queries. Not very user-friendly either given all the extra they add to the query. I have tried to insert meta-tags from other sources, which works fine, but they are always strings and cannot be changed in the Properties page in SPS2003 or in the SP-DB (I tried to hack the row with my meta-tag changing it from 1(string) to 8(date) without success).

In the WHERE clause you cannot do CAST or CONVERT, which makes my date comparison impossible. > and < does not work, but = does, but I cannot make one search per day.

There is some old customization example in the platform sdk for index server, but it does not work for me although going through step by step. The example includes buying or downloading (MSDN subscribers) a big platform SDK, installing 1gb of SDK, compiling c++ files and register them in com+, changing registry entries, which seems odd for a 2003 product. It is very strange that SharePoint cannot handle anything else than strings for non-SharePoint searches. And if you are to make some own customization hack, it should at least be .NET code. MS support couldn't help me either since it was not part of the product's funtionality, but a customization of the product.

Your comment:

Title:
Name:
Email:
Website:
 
Italic Underline Blockquote Hyperlink
 
 
Please add 7 and 1 and type the answer here: