Tuesday, September 04, 2007

Enabling Wildcard Search in Sharepoint 2003



This walkthrough will guide  you how to enable wild search using SPS, you need to do the following:

  1. Export the search result web part.
  2. Customize the DWP file, add query to enable the wild search criteria
  3. Import the web part back to SPS and drop it within search page area.

Here are the details:

  1. Go to your search page. By default, you won’t be able to modify it, go to this link to enable the shared mode
  2. Modify the Shared Page, and export the search result Web Part (just save it in your desktop, by default it has *.dwp extension)
  3. The Webpart file (DWP) is basically XML File, so you can open it using Notepad. Go find this section : “QueryTemplateWherePart”
  4. Add the following code in the END of the section to enable the wide search : OR CONTAINS("urn:schemas-microsoft-com:sharepoint:portal:profile:PreferredName", '"%__keywordinput__%"') RANK BY COERCION(multiply, 0.01)
    OR CONTAINS(#WeightedProps, '"%__keywordinput__%"')
  5. Save the file, go back to your sharepoint modify page – Add Web Parts – Import
  6. Drop your modified search result web part to your search page. And that’s all, hope this help…



You ll be able to use the asterisc at the end of a word so as to make a search like Pro*, where you ll get results for word as project, prototype,etc


User will not be allowed to save their search alerts and ll get this error, "An error has occurred on the server" . You can find info here http://support.microsoft.com/kb/920823/en-us


Blogger Dev said...

Thank you for this post, but when i am trying to do wild card search using scope i.e. when i specify the scope where to search for the word, it searches in whole of the site. For eg: if i specify the name of the site to search for, it searches the whole site and returns the result from all the sites not from that particular specified site.

Can you please help me in this.
Its very urgent

11:04 AM


Post a Comment

<< Home