in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

Tobias Zimmergren's thoughts on development - MOVED!

THIS BLOG HAS MOVED!!!
NEW URL: www.zimmergren.net
Please update your RSS and bookmarks!

Any comments here will not be answered, please comment on http://www.zimmergren.net instead!
All the same posts are there

MOSS 2007: Connect a custom Search Page to a custom Search Scope

Author: Tobias Zimmergren
Url:
http://www.sharepointblogs.com/zimmer

The other day I got a comment on a post from one of my readers who wanted to know how you can connect your custom created Search Page with a specific Search Scope.

Create a custom Search Page

  1. Navigate to your Search Center (http://yourcompany/SearchCenter)
  2. Choose "Site Actions -> Create Page"
  3. Create a new Search Page by using the "(Welcome Page) Search Page" template and fill in your details

It should look like this:

Create a custom Search Results Page

  1. Make sure that you are back at the Search Center site
  2. Choose "Site Actions -> Create Page"
  3. Create a new Search Results Page by using the "(Welcome Page) Search Results Page" template and fill in your details

It should look something like this:

Add the newly created Search Page to the tablist in your Search Center

  1. Make sure that you are back at the Search Center site
  2. Choose "Site Actions -> View All Site Contents"

You will now see one list for the Search Pages and one list for the Search Results Pages, as seen in this picture:

  1. Navigate to "Tabs in Search Pages"
  2. Choose "New -> New Item"
  3. Enter the Title, Page (The page.aspx you created earlier. I used ZimmerSearch.aspx) and optionally enter a Tooltip
  4. Click "OK"
  5. You will see your new Tab show up in the list

Add the newly created Search Results Page to the Tablist in your Search Center

  1. In the top of your left menu you will see "View All Site Content", Click it.
  2. Repeat the steps from the previous section but use the Search Results Page you created instead.

If you navigate to your Search Center, you will see that your Tab has been added to the Tablist:

Connect your Search Page  with your Search Results Page

  1. Click on your newly created Tab
  2. Choose "Site Actions -> Edit Page"
  3. Choose "Edit -> Modify This Shared Web Part" on your Search Box
  4. Under the "Scopes Dropdown" section choose "Show, do not include contextual scopes" in the Dropdown mode
  5. Enter a Dropdown label if you'd like

It should look something like this:

  1. Expand the "Miscellaneous" section
  2. Enter your Search Results Page filename into the "Target search results page URL" textbox (I used ZimmerSearchResults.aspx)
  3. Click "Ok"

Now publish the page and it should look something like this:

Make sure it works

  1. Make a search on your custom Search Page
  2. Make sure that the url contians your custom Search Results Page
    (Mine is: http://zimmer/SearchCenter/Pages/ZimmerSearchResults.aspx)
  3. It works!

Can I bind the Search Page to a specific Scope?

Of course you can. Follow these steps:

  1. Navigate to the Site's Scope's section (I usually just navigate to http://zimmer/_layouts/viewscopes.aspx?mode=site)
    (This can be done by just navigating to Site Settings, Go to Top Level site settings, Search Scopes)
  2. Choose "New Display Group"
  3. Enter a Title (Important: Remember this name!)
  4. Choose your Scope in the Scopes list
  5. Make sure it's also the Default Scope
  6. Click OK

Your displaygroup should be shown with a scope, similar to this:

  1. Go back to your Search Center
  2. Navigate to your custom created Search Page
  3. Again, choose "Site Actions -> Edit Page"
  4. Expand the "Miscellaneous" section
  5. Locate the "Scope Display Group" text box
  6. Enter your newly created Display Group (The name of the display group, mine was Zimmer)
  7. Click "OK"
  8. Publish your page

The Dropdown with Scopes should now only contain your newly added Display Group, similar to the following screenshot:

And what do you know... It works :)

Thanks for taking your time to read this, please leave a comment or two :)

Comments

 

NorrlandsNiklas said:

jjena tobbe.... jäklar vilka grymma inlägg du har i bloggen nu när du kom igång igen :)

tycker du skriver nice och lär mig några nya tips varje gång.... jag har inte så mycket mer att säga än att det är grymt....

english: keep up the good work, you write great posts.

August 25, 2007 12:41 PM
 

Tobias Zimmergren said:

Thanks Niklas.

August 26, 2007 7:16 AM
 

Links (8/26/2007) « Steve Pietrek’s SharePoint Stuff said:

Pingback from  Links (8/26/2007) « Steve Pietrek’s SharePoint Stuff

August 26, 2007 6:46 PM
 

at Virtual Generations said:

Pingback from  at  Virtual Generations

August 27, 2007 4:46 AM
 

Dave Lora said:

Thanks, this was so helpful!  This seems like such a common task--too bad it takes so many steps.

August 28, 2007 9:16 AM
 

Tobias Zimmergren said:

Most things tend to take a few too many steps these days ;)

I'm glad you liked the post.

August 28, 2007 10:40 AM
 

Oskar Austegard said:

Ja det er utrolig hva en kan lære via Google Reader.  Jeg trengte nettopp å gjøre akkurat dette... Takk skal du ha.

English: +1

August 28, 2007 4:10 PM
 

Seth Moupre said:

How can you display multiple scopes on a search results page. For example,

News

 - Result 1

 - Result 2

Products

 - Result 1

 - Result 2

etc. It does not look like the search XML has scope information and you can't tie a search results web part to a scope.

August 30, 2007 11:26 AM
 

Roger Muhrman said:

Seth,

you can obtain the result in your Search Core Result web part for a specific scope.

Create your customized Search Result page, and perform the following steps:

1. Edit the Search Core Result Web Part.

2. Under Miscellaneous, change Scope to News.

3. Change Appearance > Title to News.

4. Add another Search Core Result Web Part

5. Under  Miscellaneous, change Scope to Products.

6. Change Appearance > Title to Products

7. In both Search Core Result Web Parts make sure that you use a unique value in Results Query Options > Cross Web Part query ID. This way if you want to add additional Search Web Parts, they can be defined to work with a specific subset of your search result.

Hope this works for you!

August 30, 2007 1:25 PM
 

Seth Moupre said:

Well, it does not look like that "Scope" setting actually seems to do anything. I can add multiple core search web parts and set their scope (had previously missed that) but it just seems to ignore that setting completely. It's a little suspect in that there is no drop down to actually pick a scope, you have to type it in. Hmm... Any other hints or suggestions?

August 30, 2007 4:50 PM
 

Roger Muhrman said:

Seth,

I agree that it would be much more intuitive to have a dropdown for the scopes.

I have used the scope functionality successfully so I suspect that there is another problem in your solution. Are you sure that the scopes does not interfere with each other, ie. that the Scope News also shows results from Products and vice versa?

August 31, 2007 6:05 AM
 

Seth Moupre said:

Well, apparently there is a hot fix available in order to make the scope setting work correctly. So, I got that, applied it and it works. But, the problem now is that the scope setting from first web part on the page is used for all the web parts on the page regardless of whether I have a different scope identified for the othe core search web parts. I actually have an incident support ticket opened with MS now.

August 31, 2007 11:35 AM
 

Tobias Zimmergren said:

Sorry that I havn't replied earlier, I'm up to my neck in work right now :)

Thanks for the comments guys, and thanks for the input Roger.

Seth, please keep us posted on the subject here will you? :)

September 1, 2007 10:46 AM
 

Andre said:

Many many thanks for this excelent article!!!

It helped me a lot!!!!

:-)

September 24, 2007 2:04 PM
 

Seth Moupre said:

OK, finally got closure with MS after only 6 weeks. Bottom line is that it is an identified bug and is scheduled to be fixed in SP1 due out in November/December.

Thanks for everyone's input on the issue.

September 29, 2007 12:29 AM
 

Joshua Halls said:

Using the instructions posted above (mainly about adding in the pages as needed) and Roger Muhrman's part I was able to get it to create a tabbed interface in the search center and when you click on that tab it will properly return it to the results page (which you have to change on the results search box to point it back to itself, by default it points back to results.aspx).  After doing all of this it works like a charm.  Microsoft should of taken a few extra hours to get this working correctly without all this extra hassle.

October 2, 2007 1:31 PM
 

Tobias Zimmergren said:

Glad to hear that you liked it.

I agree that we could live without all the hassle as you say. But then again, what would our jobs as consultants be without problems to solve? ;)

October 2, 2007 1:59 PM
 

MOSS2007: Search and Indexing « rinonu writes… said:

Pingback from  MOSS2007: Search and Indexing « rinonu writes…

November 1, 2007 10:53 PM
 

Eddie said:

Hello

I am not sure if this is possible, but here it goes.

I have an intranet site that index's a separate server in our company network. It works fine internally, everything is searchable, but i would like it not to be searchable outside of our network (public ip).

Thanks

February 29, 2008 10:37 AM
 

Deepak said:

Hi..

If the managed Property is of type integer then how we can set scope for that.

Example. Is Document is the managed property of type integer. I want this scope to be used in search results. How should i do this?

March 11, 2008 10:19 AM
 

Erich said:

I've used a Search Scope to search a single list that has a large number of items in it.  It's a Links list that contains a URL field.  The search works great, but I need to modify the results and display the URL field from the list.  By default, the hyperlink in the search results takes you to the individual record, not the URL within that record.

I've researched a bunch of information, including MSDN: msdn2.microsoft.com/.../ms560074.aspx

...which talks about changing the properties returned in the Core Search Results.

This has let me into Managed Properties and enabling individual properties for search scopes.  

I've tried to enable the property "OWS_URL" for search scopes, but that's not doing it either.   I'm not sure if  I'm even on the right  track.

Anyone have any insight here?   All I really want to do is expose the URL field within a list.  So that I can display that URL in the search results.

March 19, 2008 4:35 PM
 

Carles said:

Hi, I've followed this giuide step by step and it works nicely.

I only have one question. After doing a search, when you've been redirected to the resultas page, if you, for example, click on the people tab the results are filtered but if you click on the custom tab it doesn't work as it should do.

Do you know why this happens or how to solve it?

Thank you!!

May 5, 2008 8:43 AM

Leave a Comment

(required )  
(optional )
(required )  
Add

Need SharePoint Training? Attend a SharePoint Bootcamp!

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