Targeting SharePoint search scopes to different audiences – Part 3

Part 3 – Adding tabs to Search Center

Following on from Part 2 this post in the series describes how to create the tabs and secure them to only be seen by certain users (In my case ‘sales’).

To create a tab there is quite a simple process and to do this all you need to do is edit a couple of lists stored in the search center called 'Tabs in Search Pages’ and ‘Tabs in Search Results’

image

Select the first list above and add a new item to the list.

Tabs in Search Pages

image

At this stage you need to remember the name of the page you created in Part 2 as you will need to enter this in the next screen.

image

Once you’ve entered the information correctly click save.

This is the crucial bit where we set the security on tab to targeted users. On the list where the item ‘Pauls blog’ appears select this item and from the ribbon click item permissions.

image

Remove permissions to all users and add the sales AD group.

Follow the same steps as Tabs for Search Pages above for Tabs for Search Results list.

Once you have followed the steps above you should now have a newly created targeted tab within your enterprise search center as shown below.

Tabs in Search Page

image

Tabs in Results Page

image

Real world examples

To put some real world on this the sort of scenarios this could apply to may be rolling out people finder (My Sites) to certain departments or searching of legacy systems to specific users.

It’s also worth noting that this is series of posts focuses on non SharePoint (anonymous) related content where security trimming results do not apply. If security m ay be an issue this needs to be considered as part of the design.

Conclusion

This scope is not necessarily 100% secure as you could drop a search web part into a site and narrow it down this way but to do this you would need site collection admin rights so the risk is minimal.

This blog does not focus on additional security trimming of content and without testing and design you may be providing users to unauthorised results so the advice here is use an account to access other systems with minimal rights. If you do need an elevated results pane why not create 2 scopes / results pages and use different crawl accounts providing access only to authorised users to the elevated results.

I hope this has been of use to you.

Targeting SharePoint search scopes to different audiences – Part 2

Part 2 – Creating Results Page

Continuing on from Part 1, Part 2 of the series focuses on creating the results page for use with the targeted audiences.

Within the enterprise search center create a new page from site actions on the ribbon and give it a name.

image

You’ll then be presented with a new results page which if your not used to may look a little daunting. From this page what we need to do is tailor the results web part to only display results for the newly created scope.

Locate the web part search core results shown below and select edit web part from the drop down.

image

On the right hand side you need to enter the scope exactly as you did for part 1, as this is a manual entry this can easily be entered incorrectly so pay special attention to this.

image

Click ok at the bottom of the properties noting that if the content source has completed results may not be displayed until the page is saved and reloaded PLEASE DONT SAVE THE PAGE YET THOUGH!

The next step I describe I didn't originally do and this caught me out as the tab I describe in a later part to the series kept reverting back to the default results page and the tab would highlight the wrong scope so a new search would search the wrong source!

Locate the web part search box and edit the web part properties. From here expand the section miscellaneous. Modify the search results page to be the name of the page you are in the middle of creating, this basically means that once a search is committed on this page the scope will remain on the same scope. In this case the scope is Pauls blog.

image

So at this stage the page is configured with the correct parameters however we're not quite finished yet, although at this stage you can now go ahead and save / publish the page. To secure who can see the page we need to edit permissions. Let’s assume we are going to show this to sales but restrict access to marketing. All we need to do is edit the permissions on the page as you would do with any other item in SharePoint you wish to secure.

So in my case I’m going to give all users part of the sales AD group access to the page. Navigate to the pages library via site settings -> view all site content –> pages. Select the newly created page and from the drop down select manage permissions.

image

From manage permissions select stop inheriting permissions.

image

Remove all the users you do not wish to view this results page / scope and add the sales AD group as readers. This now only allows sales users to be able to see the page.

Part 3 will discuss creating the tab that appear in the search center and aligning this to the newly created page described here.

Targeting SharePoint search scopes to different audiences – Part 1

Part 1 – Creating a Content Source and Scope

This blog post series details how to target search tabs in SharePoint enterprise search to specific groups of people. I have provided a guide as to how to set this up from start to finish.

The search tabs in SharePoint relate to pages where scopes can be defined for narrowing down results as shown below.

image

Firstly you need to create a content source for the scope to use of the site you wish to crawl / index. In my case this was a non SharePoint website. So for the purposes of the demo I’ll create a content source called ‘Pauls Blog’ and crawl http://www.paulgrimley.com.

image

Once the content source is created run a full crawl and make sure that you successfully crawl by checking the crawl log.

image

Whilst the content source is crawling next thing to do is create a scope that contains the content source (make sure you compile the scope from search administration).

From the search navigation on the left hand select scopes under ‘Queries and Results’. From here click ‘New Scope’.

image

We’ll come back to the search results page later as this will need configuring. On the next page one thing that can trip you up assuming that you’ve created you’re scope and its ready. Before its ready to be used the scope needs two things – rules and compiling once the rules are in place. Firstly select ‘Add Rules’ which is where I will assign the content source created earlier to the scope.

image

On the next page simply select the content source option and pick Pauls Blog from the drop down and click ok.

image

Notice on the next page it will state the scope is not ready until the next scheduled compile which in this case is 8 minutes.

image

To speed up this process you can force an immediate update of the job by compiling scopes from the search administration home page. Simply select Start update now and this should compile your scope within a small space of time.

image

So now the scope should be available for use within the enterprise search site collection. In Part 2 I will discuss creating a separate results page that can be secured and targeted at specific individuals.

Deploying SharePoint Globally – Slides from SharePoint Saturday

Please see below my slides from SharePoint Saturday 12/11/2011.

Thanks for all those who attended, it was a great session.

Are we over complicating SharePoint quotes – maybe!

This blog post is written on the back of lots and lots of quoting recently and the slant on this blog post is one of a consultancy firm providing clients with a quotation on the back of a requirement or set of requirements.

The requirement(s) could be something very simple or very complex but nonetheless its still a problem that needs a solution.

So I’ll pick something that should be familiar to those who work with or are familiar with SharePoint and work around explaining the title of my post in relation to this example. So we have been requested to create a web part for SharePoint. Lets just say for example the web part has a free text field where when a value is entered it looks up employee ID. This information is stored in a SQL database.

So with the above classed as a requirement there are one of 2 ways you could approach this:

1.Make lots of assumptions which the client may not understand and potentially not deliver within the timescales provided

2. Gather further information regarding the initial requirement to gain a more accurate understanding thus more closely meeting client expectations

Before discussing these options there are also additional considerations when quoting that the client may not have considered or budgeted for when the client receives the quotation. These things include (to name a few):

  • Testing
  • Project management
  • Documentation

Referring back to my two options, choosing option 1 may get you near the end result you were looking for (if you’re lucky) but on the other hand you could have wasted a lot of time and money and only be a little further forward but wiser nonetheless.

Option 2 will give you a clear idea of what can be achieved and the timescales to do so and in the process if you’ve structured the consultancy engagement in such a way of fixing the delivery agreeing scope beforehand the risk is offloaded onto the external consultancy firm. Yes I appreciate that gathering requirements in more detail will cost you a little time and the outcome maybe that what you actually expected to be delivered needs adjusting to what you can actually afford, wouldn't you want to find out beforehand?

As a bit of advice before going into an engagement make sure you have thought through what you actually want in detail thinking about not only what the requirements are but also what you would to happen on the screen or outputs to be in every eventuality you can think of (functional requirements). As an example for my specific scenario consider how you would want the web part to behave when the SQL database storing employee ID’s is unavailable – what should be displayed when the user enters a query? If you don't assumptions will be made for you and you could end up with a different output to what you expected.

The conclusion here is that the more information you can provide and the more understanding (where possible and appreciate this isn't always possible) of the problem this may narrow down the time required to deliver the solution, after all in the current climate we all want to be careful with how spend budgets. As regards the tax that go on top of delivering the functionality (project management, testing etc.) as consultants we do this everyday so we know what's involved, cutting corners on this just means you are going against the experts who you have asked for advice from and in the process adding lots of risk to delivering a successful outcome.