Logo Home   Help   
WSS FAQ
 
 
 (Hidden) ToolPane Manager
There are no more meeting occurrences to select from.
expand Q: 01What are the Operating Systems Requirements? 
 
Unlike STS 1.0 which worked on several operating systems - even if it in production tended to be installed on a Windows 2K Server variant, WSS will only work on .Net Server and in particular all versions of .Net Server except the Web Edition.
 
Jorgon Johanson of Norway send me however a lot of detail on using WSS with the Web Edition including the following.
'According to Microsoft WSS will run on the Web Edition, but there are two catches:
 
Catch 1 - The Web Edition can NOT host the database.
"You must use the remotesql=yes parameter to install Windows SharePoint Services Beta 2 on Windows Server 2003, Web Edition. For more information about installing Windows SharePoint Services Beta 2 to work with Microsoft SQL Server 2000, see Remote SQL Server Deployment."
 
Catch 2 - The Web Edition may be difficult to get hold of.
"It (The Web Edition) will only be distributed through selected partner channels and will not be available for retail. Service providers should visit the Microsoft Service Providers Web site for more information."'
Edit

Comments
expand Q: 02What is the Relationship to SharePoint Portal Server 2.0? 
 
SharePoint Portal Server (SPS) 1.0 and SharePoint Team Services (STS) 1.0 were two separate products that confusingly shared the same name and had limited interaction (and that, only in one direction after both Service Pack 1's came out when SPS could also include information stored in STS in its searches).
 
SPS 2.0 is built on top of WSS. As such it now adds additional functionality rather than it being a completely separate product.
Here is a list of the extra functionality in SPS 2.0 as provided in the SPS newsgroup by James Edelen
 
Enterprise Search (multiple content sources)
Audiences
User Profiles
My Site
Farm Scaling
Enterprise Application Integration Framework / Single Sign-on
Central Site Manageability
Areas (Taxonomy for Documents, sites, etc.)
 
and as I didn't know what "Taxonomy" meant either, I looked it up - "classification, especially in biology" (Concise Oxford)
Edit

Comments
expand Q: 03What is the Relationship to Office? 
 
STS 1.0 had certain functions (such as Open Document) that relied on the presence of Office XP in the client workstation.
 
However most functionality was available to Office 2K (and Office 97?) users.
 
Users of Office who didn't have STS 1.0 installed had full Office functionality available.
 
With WSS some administrator functions are only available to users with FrontPage 2003 installed on their clients. (For instance it's essential for some site amendments)
 
Users of Office 2003 get full functionality only if they have WSS installed.
 
One part of full functionality is the opening up in for instance Excel of a WSS Document Workspace where documents from selected WSS document libraries are listed; can be amended and additional documents can be uploaded to them from within Excel.
 
Note: See also section V where this Office / WSS relationship is dealt with in detail
Edit

Comments
expand Q: 04What is the Relationship to FrontPage? 
 
Just as FrontPage XP could be used for a certain amount of basic customization with STS 1.0, so FrontPage 2003 can be used for similar customization with WSS.
 
Front Page 2003 also extends (compared to STS) the range of customizations that are possible.
 
The use of back versions of FP is not possible in connection with a WSS site.
 
In STS 1.0 it was dangerous to amend certain of the template and similar files with FP. It is unknown whether this is the case with WSS.
 
Gavin Wall points out that (text slightly amended)
 
Modifications to the Default.aspx file with Frontpage will prevent 'Ghosting' from working for that site or subsite.
 
Thanks Gavin!
Edit

Comments
expand Q: 05What is the Relationship to MSDE and SQL Server? 
 
STS 1.0 used as default MSDE 1.0 and also worked with both SQL Server 7.0 and 2K.
 
WSS uses as default WMSDE which is a special version of MSDE 2K and ONLY works with SQL Server 2K (and variants) not 7.0.
 
Note that in order for SQL Server 2K to work on a Windows 2003 Server it (SQL Server) must use Service Pack 3 or later. (Ed: in fact SP3a)
 
Note also that some functionality (see below I.7) is not available with MSDE 2K.

Note: A little known fact is that the version of MSDE used with WSS (called "WMSDE") is not the same version of MSDE as that used by SPS v2.
 
WMSDE, whose use is restricted to Windows Components (in this case WSS), has a different product code in which the 5 concurrent users (then a slowdown in performance) limit from MSDE 1.0 has been removed as has the 2GB limit in the size of the database that was also present in MSDE 1.0.
 
(I was asked by Paul Lynch if the text in a Microsoft document about reduced storage space with WMSDE was incorrect - yes, as far as the size of the database goes it is!)
 
Both these limits are still contained within the MSDE version that is used by SPS v2.
 
Finally, note (SPS v2 only) that if you are installing onto a Domain Controller, MSDE is not available as an option.
Edit

Comments
expand Q: 06What is the Usage of MSDE and SQL Server? 
 
STS 1.0 stored documents in the File system while the database contained information on the location of the documents.
 
WSS stores documents in the database.
Edit

Comments
expand Q: 07.01The basic search function 
 
In STS 1.0 the search function (as provided by MS) searched only in documents.
 
In WSS the built-in search function now searches on the contents of both documents and lists.
 
In STS 1.0 the search function was always available no matter what database was used.
 
In WSS the search function is no longer available for sites with MSDE 2K unless they also have SPS 2.0 (SharePoint Portal Server 2.0) installed.
 
(The options are SQL Server searching or SPS 2.0 searching. SPS 2.0 searching works where the WSS database is either SQL Server 2K or MSDE 2K; SQL Server searching works only where the WSS database is SQL Server 2K. MS recommend SPS 2.0 searching for very large sites)

Note: Ian Morrish has developed a solution for being able to search a single SharePoint list. See http://www.wssdemo.com/pages/search.aspx for this.
 
Stop Press: This link no longer works. Try going to www.wssdemo.com and searching the site for this item.
Edit

Comments
expand Q: 07.02Adding file types to the indexing routines needed for the search 
 
In STS 1.0 adding file types to the indexing routines required very difficult adjustments. The only company which provided a routine for this was Adobe who provided a routine that both added an icon for .pdf files (as IV.2) and added .pdf files to the types covered by the search. Otherwise the only option was to allow indexing of *all* file types. (Recently a Visio filter - untested by this user - has become available from Microsoft for searching Visio files).
 
In WSS indexing is SQL Searching or SPS Searching (see I.7.1).
 

 
Edit

Comments
expand Q: 07.03Can you tell me how an SQL Search is performed ? 
 
When you search WSS sites with SQL Searching, the search is performed by using a FREETEXT statement.
 
Using FREETEXT allows searching by intent; all terms are 'stemmed' or in other words the query looks for all inflectional forms of each query term.
 
For instance, if you query for "swim", the query also returns results including "swam"; "swimming", and so on.
 
If you want more information on what is possible using FREETEXT look at SQL Books Online.
 
(Thanks to Jerry Orman who provided the basic information in this text)
 
Edit

Comments
expand Q: 07.04Which things are covered by SQL Searching ? 
 
Full information is in the Admin Guide. Here are some basic facts
 
Searched
 
List items
Documents
Lists

Possibly searched

File types other than .doc, .xls, .ppt, .txt, and .htm
 
These need customized SQL Search search filters to be included in searches.
 
Not searched
 
Non-text list fields (such as currency, number, lookup, Yes/No)
Attachments to lists
File Properties used by Office 2003 documents (such as "Author" and "Company")
Survey Lists
Hidden Lists

 
Other things you can't do
 
Boolean searches (but see I.07.09 for a fix)
Display the number of matching items
 
(Thanks again to Jerry Orman for pointing out the Admin Guide and giving the above in a different form)
Edit

Comments
expand Q: 07.05Why are SQL search results grouped in sets of only five items ? 
 
The search results page is divided into two sections - list items and document items.
 
This is to avoid a situation in which only documents are selected by a search (because of the number of times the search word appears in a document).
 
Because there are thus potentially a number of list items AND a number of document items selected it was decided that the most suitable number of list items and documents per page would be five (each) - i.e a possible total of ten.
Edit

Comments
expand Q: 07.06How do I ensure that .pdf files are included in the Search function? 
 
The first step would be to ensure that .pdf files are included in the list of acceptable file types (see I.12.3 File Types you can't upload) as otherwise you won't have any .pdf files in your WSS system that you can index.
 
Secondly, you should add the Adobe IFilter to the WSS server (or, if you are running with the database on another server to the WSS front-end, to the database server).
 
This IFilter can be found on the Adobe site and is an .exe file that automatically sets up your site to be able to index .pdf files.
 
Finally you should be aware that .pdf files are only indexed that are added to your WSS site after the Adobe IFilter has been installed. In order to get round this problem you should re-upload the files that were on the site before the Adobe IFilter.(although see below *)
 
(Thanks to Bobby Ma for this final piece of the puzzle)
 
There's also a Microsoft article on SQL Server Full-Text Indexing with the Adobe IFilter that might be useful.
 
http://support.microsoft.com/default.aspx?scid=kb;en-us;323040
 
Note the following address for the Adobe IFilter which might prove successful when http downloads aren't
 
ftp://ftp.adobe.com/pub/adobe/acrobat/win/all/
 
or
 
http://www.adobe.com/support/salesdocs/1043a.htm which is the latest (24 Nov 2003) working Adobe http link.
 
Christian Super adds a new link for the new version of the PDF IFilter - 6.0.  
 
 
and notes that this version has been tested with SPS (no specific mention of WSS) as shown below:
In addition, PDF IFilter 6.0 has been tested in the following environments:
• Microsoft Windows 2000 Server (Service Pack 3) with Microsoft Office SharePoint Portal Server 2001
• Microsoft Windows 2003 Server with Microsoft Office SharePoint Portal Server 2003
 
Thanks Christian !
 
* Ian Morrish posted the following comment
 
I have seen it mentioned  that if you already have PDF files in a document library and then add the Adobe iFilter you have to re-add the documents to the library before they will be indexed. Fortunately this is not true. SQL Server has some system stored procedures to manage indexing.
Use SQL Query Analyser to run the following command (after installing your iFilter)
 
USE Name_of_your_WSS_content_db
EXEC sp_fulltext_catalog 'ix_STS_servername_xxxxxx', 'rebuild'

You will find the correct string for 'ix_STS_servername_xxxxxx' by using SQL Server Enterprise Manager. Expand the WSS content database and click on Full-TextCatalogs.
 
No restart of any services was required for me to be able to search on PDF contents.
 
Philip Colmer added this addition to Ian's method.
 
I struggled with the EXEC command in order to get the full-text index rebuilt. I've got two potential full-text catalogs on my SQL server and I didn't know which one to execute the command against.
 
In the end, I went to Central Administration, turned off full-text search, waited for the full-text catalogs to be removed from SQL and then turned it back on. I then waited again for the population of the catalogs to finish, performed a test search and my PDFs were found. This is a safer path to take if the SharePoint admin is cautious about executing SQL commands.
 
Marc David commented that
 
"I'm running my WSS server on a seperate front-end and a back-end SQL server.  I installed this iFilter only to the front-end web server and indexing worked just fine.  I did not have to install it to the database."
 
I'd be grateful if someone else could confirm this on two new servers. It goes against everyone else's experience.
 
SPS 2003 only note:
 
Monty added that
 
If using SPS 2003 you need the iFilter on the Indexing server as it has the Service that controls indexing.
 
Dan added to that (!)
 
We have WSS running one front-end server and backend SQL 2000.  I installed the PDF ifilter v6 to the SQL server, restarted the MS Search service (on SQL server) and it appears the PDF docs are now being indexed.
 
Thanks, Monty and Dan!


Finally (?), Carlos added the way he does this:- But note that he uses 12/ so it must be for a v*3* SharePoint product so isn't really appropriate for this v2 FAQ


1) you install iFilter

2) add registry 38 with value pdf

3) iisreset

4) perform full update

net stop spsearch
net start spsearch
under 12/bin
stsadm -o spsearch -action fullcrawlstop
stsadm -o spsearch -action fullcrawlstart


Thanks, Carlos
Edit

Comments
expand Q: 07.07What is the scope of a search? 
 
Search in WSS is scoped to a site (what in STS was a "subweb").
 
So if you do a search on a Main Site, it will return results only from the top level Site and not from any lower-level sites that are under it in the structure.
 
(Adapted from a message from Iyaz)
Edit

Comments
expand Q: 07.08How can I get the results of a search to open a document rather than the WSS information about the document? 
 
When you click on the results of a Search, you will get the DispForm.aspx view of the document (typically Name; Title; Comments) opening rather than the document itself. You then have to click on the document name in the DispForm page to open the document itself.
 
To avoid this amend the stored procedure (*)proc_FetchDocSearchResults as follows.
 
Look for the following lines:
                   SET NOCOUNT ON
                   SELECT
                         NULL,
                         NULL,
                         NULL,
                         Docs.DirName,
                         Docs.LeafName,
                         Docs.DocLibRowId,
                         Docs.ListId,
                         Lists.tp_Title,
                         UserData.tp_Author,
                         UserData.tp_Editor,
                         UserInfo.tp_Title,
                         Docs.TimeLastModified AS LastModified,
                         Docs.[Size],
                         Docs.Id AS ItemId,
                         Docs#CT.Rank AS CT#Rank,
                         CASE WHEN (Docs.Type = 1)
                              THEN 3
                              ELSE 2
                         END
                   FROM
                         Docs
 
and replace the line
                         Docs.DocLibRowId,
with
                         null,
 
Many thanks to Carl Lewis for providing this.

Rich Marshall points out that

"you edit the stored procedure using SQL Server Enterprise Manager. Drill down until you find your WSS database."

Thanks Rich!

 


Edit

Comments
expand Q: 07.09How do I use Boolean functions in my searches? 
 
Derek Fakehany very kindly send me a lot of detail on this.
 
He praised in his note to me the fix that Carl Lewis had posted in the WSS newsgroup which made him realise that Boolean searches were possible.
 
The solution below is however a) put in the kind of detailed way that a FAQ item needs and b) includes Boolean searches of Lists which Carl's solution didn't.
 
Here are Derek's steps -
 
1. Get into your Windows Sharepoint Services (WSS) box
 
2. Fire up SQL Enterprise Manager
 
3. Work your way down to your database(s) for Sharepoint
 
4. Open your database and then open the Stored Procedures for the database
 
5. To enable Boolean for document libraries, look for the stored procedure called “proc_FetchDocSearchResults”
 
6. Make a backup of the procedure (I just right-clicked, selected copy and pasted it into a Notepad document).
 
7. Right-click on the stored procedure and select “Properties”
 
8. You’ll get a window with the procedure outlined. Make the following changes:
 
a. Add the following lines to the procedure before the line "SET NOCOUNT ON":
      DECLARE @CustSearchTerm nvarchar(255)
      SET @CustSearchTerm = '"' + @SearchTerm + '"'
 
b. Find the word “FreeTextTable” and replace it with “ContainsTable”
 
c. In the same line change the variable “@SearchTerm” to “@CustSearchTerm
 
9. Hit Apply & OK
 
10. To enable Boolean for lists, look for the stored procedure called “proc_FetchListItemSearchResults”
 
11. Make a backup of the procedure
 
12. Right-click on the stored procedure and select “Properties”
 
13. Make the same changes in Step #8 above – HOWEVER, note that there are MULTIPLE OCCURRENCES (three to be exact) of FreeTextTable and @SearchTerm. You need to change ALL THREE OCCURRENCES.
 
14. Hit Apply & OK.
 
15. Repeat for each Sharepoint database you may have
 
16. Close the Enterprise Manager
 
17. Run IISRESET

Note that the new search only supports and/or but that's all I really need. And it will ONLY work if you actually specify and/or in your search (i.e. “testing AND tips” rather than “testing tips”).
 
Thanks, Derek! (and thanks too to Carl for starting things moving.
 
----------------
 
Billy Brackeen sent me what he described as an enhanced solution using your method.
 
Note however the next section (a long way down) which has what the writer of that describes as an improved version of this.
 
Basically I created two alternative scripts (proc_FetchDocSearchResultsBoolean and proc_FetchListItemSearchResultsBoolean).
 
If the search text contains an ‘ AND ‘ or an ‘ OR ‘ the search is sent from the original code to the new Boolean counterparts. Thus leaving the search behavior the same until a Boolean is entered.
 
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[proc_FetchDocSearchResults]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[proc_FetchDocSearchResults]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[proc_FetchDocSearchResultsBoolean]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[proc_FetchDocSearchResultsBoolean]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[proc_FetchListItemSearchResults]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[proc_FetchListItemSearchResults]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[proc_FetchListItemSearchResultsBoolean]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[proc_FetchListItemSearchResultsBoolean]
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE proc_FetchDocSearchResults
(
                  @SearchTerm nvarchar(255),
                  @SiteId uniqueidentifier,
                  @WebId uniqueidentifier,
                  @RankPaging int,
                  @ModifiedPaging datetime,
                  @ItemIdPaging uniqueidentifier)
            AS
            
                  IF CHARINDEX(' OR ', @SearchTerm) > 0 OR CHARINDEX(' AND ', @SearchTerm) > 0
                  Begin
                    EXEC proc_FetchDocSearchResultsBoolean @SearchTerm, @SiteId, @WebId, @RankPaging, @ModifiedPaging, @ItemIdPaging
                    RETURN
                  End
            
                  SET NOCOUNT ON
                  SELECT
                        NULL,
                        NULL,
                        NULL,
                        Docs.DirName,
                        Docs.LeafName,
                        Docs.DocLibRowId,
                        Docs.ListId,
                        Lists.tp_Title,
                        UserData.tp_Author,
                        UserData.tp_Editor,
                        UserInfo.tp_Title,
                        Docs.TimeLastModified AS LastModified,
                        Docs.[Size],
                        Docs.Id AS ItemId,
                        Docs#CT.Rank AS CT#Rank,
                        CASE WHEN (Docs.Type = 1)
                             THEN 3
                             ELSE 2
                        END
                  FROM
                        Docs
                  INNER JOIN
                        FreeTextTable(Docs, *, @SearchTerm) AS Docs#CT
                  ON
                        Docs#CT.[Key] = Docs.ID
                  LEFT OUTER JOIN
                        Lists
                  ON
                        Docs.ListId = Lists.tp_ID
                  LEFT OUTER JOIN
                        UserData
                  ON
                        (Docs.ListId = UserData.tp_ListId) AND
                        (Docs.DocLibRowId = UserData.tp_ID)
                  LEFT OUTER JOIN
                        UserInfo
                  ON
                        (UserData.tp_Editor = UserInfo.tp_ID) AND
                        (UserData.tp_SiteId = UserInfo.tp_SiteID)
                  WHERE
                        @SiteId = Docs.SiteId AND
                        @WebId = Docs.WebId AND
                        ((Lists.tp_Flags IS NULL) OR
                         ((Lists.tp_Flags & 0x400) = 0) OR
                         (UserData.tp_ModerationStatus IS NULL) OR
                         (UserData.tp_ModerationStatus = 0)) AND
                        ((Docs.Type = 0) OR
                         ((Docs.Type = 1) AND
                          (Docs.DoclibRowId IS NOT NULL))) AND
                        ((@RankPaging IS NULL) OR
                         (Docs#CT.Rank < @RankPaging) OR
                         ((Docs#CT.Rank = @RankPaging) AND
                          ((Docs.TimeLastModified < @ModifiedPaging) OR
                           ((Docs.TimeLastModified = @ModifiedPaging) AND
                            (Docs.Id > @ItemIdPaging)))))
                  ORDER BY
                        CT#Rank DESC,
                        LastModified DESC,
                        ItemId ASC
                  RETURN 0
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE proc_FetchDocSearchResultsBoolean
(
                  @SearchTerm nvarchar(255),
                  @SiteId uniqueidentifier,
                  @WebId uniqueidentifier,
                  @RankPaging int,
                  @ModifiedPaging datetime,
                  @ItemIdPaging uniqueidentifier)
            AS
            
                  DECLARE @CustSearchTerm nvarchar(255)
                  SET @CustSearchTerm = '"' + @SearchTerm + '"'
            
                  SET NOCOUNT ON
                  SELECT
                        NULL,
                        NULL,
                        NULL,
                        Docs.DirName,
                        Docs.LeafName,
                        Docs.DocLibRowId,
                        Docs.ListId,
                        Lists.tp_Title,
                        UserData.tp_Author,
                        UserData.tp_Editor,
                        UserInfo.tp_Title,
                        Docs.TimeLastModified AS LastModified,
                        Docs.[Size],
                        Docs.Id AS ItemId,
                        Docs#CT.Rank AS CT#Rank,
                        CASE WHEN (Docs.Type = 1)
                             THEN 3
                             ELSE 2
                        END
                  FROM
                        Docs
                  INNER JOIN
                        ContainsTable(Docs, *, @CustSearchTerm) AS Docs#CT
                  ON
                        Docs#CT.[Key] = Docs.ID
                  LEFT OUTER JOIN
                        Lists
                  ON
                        Docs.ListId = Lists.tp_ID
                  LEFT OUTER JOIN
                        UserData
                  ON
                        (Docs.ListId = UserData.tp_ListId) AND
                        (Docs.DocLibRowId = UserData.tp_ID)
                  LEFT OUTER JOIN
                        UserInfo
                  ON
                        (UserData.tp_Editor = UserInfo.tp_ID) AND
                        (UserData.tp_SiteId = UserInfo.tp_SiteID)
                  WHERE
                        @SiteId = Docs.SiteId AND
                        @WebId = Docs.WebId AND
                        ((Lists.tp_Flags IS NULL) OR
                         ((Lists.tp_Flags & 0x400) = 0) OR
                         (UserData.tp_ModerationStatus IS NULL) OR
                         (UserData.tp_ModerationStatus = 0)) AND
                        ((Docs.Type = 0) OR
                         ((Docs.Type = 1) AND
                          (Docs.DoclibRowId IS NOT NULL))) AND
                        ((@RankPaging IS NULL) OR
                         (Docs#CT.Rank < @RankPaging) OR
                         ((Docs#CT.Rank = @RankPaging) AND
                          ((Docs.TimeLastModified < @ModifiedPaging) OR
                           ((Docs.TimeLastModified = @ModifiedPaging) AND
                            (Docs.Id > @ItemIdPaging)))))
                  ORDER BY
                        CT#Rank DESC,
                        LastModified DESC,
                        ItemId ASC
                  RETURN 0
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE proc_FetchListItemSearchResults
(
                  @SearchTerm nvarchar(255),
                  @SiteId uniqueidentifier,
                  @WebId uniqueidentifier,
                  @RankPaging int,
                  @ModifiedPaging datetime,
                  @ItemIdPaging uniqueidentifier)
            AS
            
                  IF CHARINDEX(' OR ', @SearchTerm) > 0 OR CHARINDEX(' AND ', @SearchTerm) > 0
                  Begin
                    EXEC proc_FetchListItemSearchResultsBoolean @SearchTerm, @SiteId, @WebId, @RankPaging, @ModifiedPaging, @ItemIdPaging
                    RETURN
                  End
            
                  SET NOCOUNT ON
                  SELECT
                        UserData.nvarchar1,
                        UserData.nvarchar3,
                        UserData.nvarchar7,
                        Docs.DirName,
                        Docs.LeafName,
                        UserData.tp_ID,
                        UserData.tp_ListId,
                        Lists.tp_Title,
                        UserData.tp_Author,
                        UserData.tp_Editor,
                        UserInfo.tp_Title,
                        UserData.tp_Modified AS LastModified,
                        NULL,
                        UserData.tp_GUID AS ItemId,
                        ISNULL(UserData#CT.Rank,0) + ISNULL(UserInfo#CT.Rank,0)
                              AS CT#Rank,
                        0
                  FROM
                        UserData
                  LEFT OUTER JOIN
                        FreeTextTable(UserData, *, @SearchTerm) AS UserData#CT
                  ON
                        UserData#CT.[Key] = UserData.tp_GUID
                  LEFT OUTER JOIN
                        Lists
                  ON
                        (Lists.tp_WebId = @WebId) AND
                        (Lists.tp_ID = UserData.tp_ListId)
                  LEFT OUTER JOIN
                        UserInfo
                  ON
                        (UserInfo.tp_ID = UserData.tp_Editor) AND
                        (UserInfo.tp_SiteID = UserData.tp_SiteId)
                  LEFT OUTER JOIN
                        Docs
                  ON
                        (Docs.SiteId = @SiteId) AND
                        (Docs.ListId = UserData.tp_ListId) AND
                        (Docs.DocLibRowId = UserData.tp_ID)
                  LEFT OUTER JOIN
                        FreeTextTable(UserInfo, *, @SearchTerm) AS UserInfo#CT
                  ON
                        UserInfo#CT.[Key] = UserInfo.tp_GUID
                  WHERE
                        (@WebId = Lists.tp_WebId) AND
                        ((Lists.tp_Flags IS NULL) OR
                         ((Lists.tp_Flags & 0x400) = 0) OR
                         (UserData.tp_ModerationStatus = 0)) AND
                        ((UserData#CT.Rank IS NOT NULL) OR
                         (UserInfo#CT.Rank IS NOT NULL)) AND
                        ((@RankPaging IS NULL) OR
                         (ISNULL(UserData#CT.Rank, 0) +
                          ISNULL(UserInfo#CT.Rank, 0) < @RankPaging) OR
                         ((ISNULL(UserData#CT.Rank, 0) +
                           ISNULL(UserInfo#CT.Rank, 0) = @RankPaging) AND
                          ((UserData.tp_Modified < @ModifiedPaging) OR
                           ((UserData.tp_Modified = @ModifiedPaging) AND
                            (UserData.tp_GUID > @ItemIdPaging)))))
                  UNION ALL
                  SELECT
                        Lists.tp_Title,
                        NULL,
                        NULL,
                        Docs.DirName,
                        Docs.LeafName,
                        NULL,
                        Lists.tp_ID,
                        NULL,
  NULL,
                     NULL,
                        NULL,
                        Lists.tp_Modified AS LastModified,
                        NULL,
                        Lists.tp_ID AS ItemId,
                        Lists#CT.Rank AS CT#Rank,
                   1
                  FROM
                        Lists
                  INNER JOIN
                        FreeTextTable(Lists, *, @SearchTerm) AS Lists#CT
                  ON
                        Lists#CT.[Key] = Lists.tp_ID
                  LEFT OUTER JOIN
                        Docs
                  ON
                        Lists.tp_RootFolder = Docs.[Id]
                  WHERE
                        (@WebId = Lists.tp_WebId) AND
                        ((@RankPaging IS NULL) OR
                         (Lists#CT.Rank < @RankPaging) OR
                         ((Lists#CT.Rank = @RankPaging) AND
                          ((Lists.tp_Modified < @ModifiedPaging) OR
                           ((Lists.tp_Modified = @ModifiedPaging) AND
                            (Lists.tp_ID > @ItemIdPaging)))))
                  ORDER BY
                        CT#Rank DESC,
                        LastModified DESC,
                        ItemId ASC
                  RETURN 0
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE proc_FetchListItemSearchResultsBoolean
(
                  @SearchTerm nvarchar(255),
                  @SiteId uniqueidentifier,
                  @WebId uniqueidentifier,
                  @RankPaging int,
                  @ModifiedPaging datetime,
                  @ItemIdPaging uniqueidentifier)
            AS
            
                  DECLARE @CustSearchTerm nvarchar(255)
                  SET @CustSearchTerm = '"' + @SearchTerm + '"'
            
                  SET NOCOUNT ON
                  SELECT
                        UserData.nvarchar1,
                        UserData.nvarchar3,
                        UserData.nvarchar7,
                        Docs.DirName,
                        Docs.LeafName,
                        UserData.tp_ID,
                        UserData.tp_ListId,
                        Lists.tp_Title,
                        UserData.tp_Author,
                        UserData.tp_Editor,
                        UserInfo.tp_Title,
                        UserData.tp_Modified AS LastModified,
                        NULL,
                        UserData.tp_GUID AS ItemId,
                        ISNULL(UserData#CT.Rank,0) + ISNULL(UserInfo#CT.Rank,0)
                              AS CT#Rank,
                        0
                  FROM
                        UserData
                  LEFT OUTER JOIN
                        ContainsTable(UserData, *, @CustSearchTerm) AS UserData#CT
                  ON
                        UserData#CT.[Key] = UserData.tp_GUID
                  LEFT OUTER JOIN
                        Lists
                  ON
                        (Lists.tp_WebId = @WebId) AND
                        (Lists.tp_ID = UserData.tp_ListId)
                  LEFT OUTER JOIN
                        UserInfo
                  ON
                        (UserInfo.tp_ID = UserData.tp_Editor) AND
                        (UserInfo.tp_SiteID = UserData.tp_SiteId)
                  LEFT OUTER JOIN
                        Docs
                  ON
                        (Docs.SiteId = @SiteId) AND
                        (Docs.ListId = UserData.tp_ListId) AND
                        (Docs.DocLibRowId = UserData.tp_ID)
                  LEFT OUTER JOIN
                        ContainsTable(UserInfo, *, @CustSearchTerm) AS UserInfo#CT
                  ON
                        UserInfo#CT.[Key] = UserInfo.tp_GUID
                  WHERE
                        (@WebId = Lists.tp_WebId) AND
                        ((Lists.tp_Flags IS NULL) OR
                         ((Lists.tp_Flags & 0x400) = 0) OR
                         (UserData.tp_ModerationStatus = 0)) AND
                        ((UserData#CT.Rank IS NOT NULL) OR
                         (UserInfo#CT.Rank IS NOT NULL)) AND
                        ((@RankPaging IS NULL) OR
                         (ISNULL(UserData#CT.Rank, 0) +
                          ISNULL(UserInfo#CT.Rank, 0) < @RankPaging) OR
                         ((ISNULL(UserData#CT.Rank, 0) +
                           ISNULL(UserInfo#CT.Rank, 0) = @RankPaging) AND
                          ((UserData.tp_Modified < @ModifiedPaging) OR
                           ((UserData.tp_Modified = @ModifiedPaging) AND
                            (UserData.tp_GUID > @ItemIdPaging)))))
                  UNION ALL
                  SELECT
                        Lists.tp_Title,
                        NULL,
                        NULL,
                        Docs.DirName,
                        Docs.LeafName,
                        NULL,
                        Lists.tp_ID,
                        NULL,
  NULL,
                     NULL,
                        NULL,
                        Lists.tp_Modified AS LastModified,
                        NULL,
                        Lists.tp_ID AS ItemId,
                        Lists#CT.Rank AS CT#Rank,
                   1
                  FROM
                        Lists
                  INNER JOIN
                        ContainsTable(Lists, *, @CustSearchTerm) AS Lists#CT
                  ON
                        Lists#CT.[Key] = Lists.tp_ID
                  LEFT OUTER JOIN
                        Docs
                  ON
                        Lists.tp_RootFolder = Docs.[Id]
                  WHERE
                        (@WebId = Lists.tp_WebId) AND
                        ((@RankPaging IS NULL) OR
                         (Lists#CT.Rank < @RankPaging) OR
                         ((Lists#CT.Rank = @RankPaging) AND
                          ((Lists.tp_Modified < @ModifiedPaging) OR
                           ((Lists.tp_Modified = @ModifiedPaging) AND
                            (Lists.tp_ID > @ItemIdPaging)))))
                  ORDER BY
                        CT#Rank DESC,
                        LastModified DESC,
                        ItemId ASC
                  RETURN 0
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO 
 
(Unchecked by Editor)
 
Thanks, Billy!
 
The following "improved" version of the above was supplied to me by Paul (of The Netherlands) but the main work had already been done by Carl Lewis when he was taking a break from the long jump (kidding - it was another Carl Lewis).
 
[Note that it's my fault if the new lines are in the wrong place - it was just too much text to edit carefully for this.]
 
-------------
 
The standard WSS search is very annoying as it contains no boolean searches. The way to fix this is to alter the stored procedure that controls the searching. proc_FetchDocSearchResults controls
searching in documents.
 
The solution I used (found it somewhere, posted by Carl Lewis) consists of 2 stored procedures,
 
First you replace the proc_FetchDocSearchResults with the code below. (Always make backups!)
Story continues below code ->
---------------------------------------------------
CREATE PROCEDURE proc_FetchDocSearchResults(@SearchTerm nvarchar(255),
@SiteId uniqueidentifier, @WebId uniqueidentifier, @RankPaging int,
@ModifiedPaging datetime, @ItemIdPaging uniqueidentifier) AS
DECLARE