Jean Paul's Blog

There are 2 types of People in the World, One who Likes SharePoint and..

    Advertisements
  • Microsoft MVP

  • MindCracker MVP

  • CodeProject MVP

  • eBook on SharePoint 2010

  • eBook on Design Patterns

  • eBook on Windows Azure

  • NLayers Framework @ CodePlex

  • MSDN Forums

  • .Net vs. Java

    Due to Public Demand
  • Advertisements

Archive for May, 2014

People Search

Posted by Paul on May 29, 2014

In this article we can explore People Search and How to configure it for SharePoint 2013 Search.

What is People Search?

People Search is the ability to Search for People by their Name & Conversations. People Search is performed by clicking the People vertical in Enterprise Search center.

For example: You can search using an existing Employee Name of your SharePoint site.

Is People Search enabled by default?

In the default configuration it is not enabled. We need to do additional configuration steps to setup people search.

Before Configuration

Following is the situation before People Search Configuration.

No result yielded when searching by name, even though the user created a document.

image

Configuration for People Search

Following are the configuration items for People Search:

1. Create My Site

2. Create Content Source

3. Full Crawl

Pre-Requisites

Following service applications should be running:

· Search Service Application

· Managed Metadata Service Application

· User Profile Service Application

Steps

Following are the configuration items for People Search:

Step 1: Create My Site

Open Central Administration > Manage Service Applications > User Profile Service Application > Setup My Sites option.

image

In the appearing page, enter the Search Center URL & Click Ok button.

image

Step 2: Create Content Source

Now we need to create a New Content Source for People Search. Open Central Administration > Manage Service Applications > Search Service Application > Content Sources link > New Content Source.

image

Enter the following details:

1. Name as People Search

2. Address as sps3://my-site-url

3. Only crawl the Site Collection of each start address

4. Save changes

image

If you receive an error saying the URL is already part of another content source, then perform following steps:

1. Stop all crawls

2. Open Local SharePoint Sites content source

3. Remove sps3:// url from there

4. Save changes

5. Try creating People Search content source again

image

The SPS3:// specifies the Protocol as SharePoint People Search. If you are using https, then choose sps3s. In the remaining part, you need to enter the My Site URL obtained from the previous step.

Step 3: Perform Full Crawl

Now perform a full crawl for the content source.

image

Wait for few minutes for the crawl to be completed.

Step 4: Test People Search

Back in the SharePoint Search user interface; try searching using a valid user name. You should see the result in the Everything and People vertical.

image

This confirms our People Search configuration as successful.

image

You need to have User Profile Synchronization running to search by a user name. Please refer the References section for more information.

References

http://technet.microsoft.com/en-us/library/hh582311(v=office.15).aspx

Summary

In this article we have explored People Search configuration for SharePoint 2013.

Advertisements

Posted in SharePoint, SharePoint 2013 | Tagged: , | Leave a Comment »

Change Result Page

Posted by Paul on May 22, 2014

In this article we can explore how to change the default search result page in SharePoint 2013.

Why we need to change the result page?

After creating Search Center site, there are 2 options for the user:

1. Use the default search box which takes to the default result page

2. Use the search center site for searching

The preferred approach is to change the default result page once the search center site is created.

Default Search Results Page

Following is the snap of the default search results page. The path would be _layouts/15/osssearchresults.aspx.

clip_image002

Default Search Results Page

Following is the snap of the enterprise search results page. The path would be searchcenter/pages/results.aspx

clip_image004

How to perform the change?

Open Site Actions > Site Settings page from the root site.

clip_image006

Click on the Search Settings link from the page. You will get the following page.

clip_image008

You can make the following changes:

1. Enter Search Center URL (for example /YourSearchCenterSite)

2. Uncheck Use the same results pageoption

3. Enter Result Page URL (for example /YourSearchCenterSite/results.aspx)

Click OK to save changes.

(my search center URLs looks like below)

clip_image010

After saving, you can Test the changes. Open the root site & search using the default search box.

clip_image012

You should see the results are shown in the Enterprise Search Center results page.

clip_image014

clip_image016

Please note that you need to create an Enterprise Search Center site before attempting this step.

Summary

In this article we have learned how to change the default search results page.

Posted in SharePoint, SharePoint 2013 | Tagged: , , | Leave a Comment »

Content Enrichment Web Service

Posted by Paul on May 21, 2014

In this article we can explore an Advanced Search feature of SharePoint 2013.

What is Content Enrichment Web Service?

SharePoint 2013 allows developers to add a custom step between content processing. SharePoint while content source crawl will call our custom web service. We can create or change the metadata properties associated with the crawl item.

Under the hood, the web service is actually implementing a pre-defined interface. Each crawl item will be passed to the interface method where item URL & properties can be accessed.

Scenarios

We can use Content Enrichment Web Service for the following scenarios:

1. You have multiple web content sources configured. You need to create new Managed Properties based on each URL. Example: Blog, Website etc.

2. You have a content source with limited metadata information. You need to add new Managed Properties based on the content.

3. You have a content source with metadata information. You need to correct the Managed Properties.

4. You have a SharePoint list where Age column exists. You need to classify the content as Minor & Major using Managed Properties.

Infrastructure

Following are the Infrastructure need:

1. Visual Studio 2012

2. IIS website to host the service

3. WCF service

Practical

To perform the Practical, we need to setup the following.

1. SharePoint 2013 Enterprise site

2. Create Enterprise Search Center site

3. Central Administration > Search > Create Content Source > Add www.jeanpaulva.com

4. Central Administration > Search > Create Content Source > Add www.sharepointcto.com

5. Central Administration > Create Crawl Rules > Include query strings (?) for both URLs

6. Server > IE Enhanced Security Configuration > Off

7. Perform Full Crawl for both content sources

After the above steps, Try searching for sharepointcto from the Enterprise Search Center site & you should be able to see results from both the URLs as shown below.

image

Our aim is to provide refiners like below.

image

Steps

Step 1: Create Service

Create a new WCF service application project.

image

Delete the existing Service files & create a new Service.

image

You can delete the interface file as well. The Solution Explorer looks like below.

image

Add Reference to the following assembly:

· 15HIVESearchApplicationsExternalMicrosoft.Office.Server.Search.ContentProcessingEnrichment.dll

Step 2: Implement Interface

Open the SVC file & implement pre-defined interface IContentProcessingEnrichmentService as shown below.

image

The only method named ProcessItem passes an Item argument and returns ProcessedItem argument.

The interface IContentProcessingEnrichmentService belongs to the ContentProcessingEnrichment assembly.

The Item type has a property named ItemProperties which contains pre-defined Name-Value pairs of:

ContentType

Access the Content Type of the item

Name

Access the Name of the item

Title

Access the Title of the item

Path

Access the Path of the item

ContentSource

Access the ContentSource name

We can specify the input & output properties while registering the service. In our case we are using the Path property.

Step 3: Create Method

Replace the method with the following code. Right click & Resolve type name errors.

public ProcessedItem ProcessItem(Item item)

{

ProcessedItem processedItem = new ProcessedItem();

processedItem.ItemProperties = new List<AbstractProperty>();

var p = item.ItemProperties.Where(n => n.Name == “Path”).First();

string url = p.ObjectValue.ToString();

if (!string.IsNullOrEmpty(url))

if (url.StartsWith(“http://www.sharepointcto.com&#8221;))

{

Property<string> property = new Property<string>()

{

Name = “WebType”,

Value = “Site”

};

processedItem.ItemProperties.Add(property);

}

else if (url.StartsWith(“http://www.jeanpaulva.com&#8221;))

{

Property<string> property = new Property<string>()

{

Name = “WebType”,

Value = “Blog”

};

processedItem.ItemProperties.Add(property);

}

return processedItem;

}

The above code performs the following:

1. Get the Path property value

2. If Path value is of www.sharepointcto.com then creates a Managed Property WebType and set value to Site

3. If Path value is of www.jeanpaulva.com then creates a Managed Property WebType and set value to Blog

4. The processedItem object will be returned by method

Step 5: Run the Service

Save & Run the Service.

image

Step 6: Create Managed Property

Open Central Administration > Service Applications > Search Service Application > Search Schema > New Managed Property page. Enter the following details.

image

· Name as WebType

· Type as Text

· Searchable enable

· Queryable enable

· Refinable yes-active

Step 7: Register Service using PowerShell

Open PowerShell ISE editor & Paste the following code.

# Add PowerShell Snapin

if ((Get-PSSnapin “Microsoft.SharePoint.PowerShell” -ErrorAction SilentlyContinue) -eq $null)

{

Add-PSSnapin “Microsoft.SharePoint.PowerShell”

}

# Get SearchServiceApplication

$ssa = Get-SPEnterpriseSearchServiceApplication

Remove-SPEnterpriseSearchContentEnrichmentConfiguration –SearchApplication $ssa

$c = New-SPEnterpriseSearchContentEnrichmentConfiguration

$c.Endpoint = “http://localhost:52156/WebsiteEnrichmentService.svc&#8221;

$c.DebugMode = $false

$c.SendRawData = $false

$c.InputProperties = “Path”

$c.OutputProperties = “WebType”

Set-SPEnterpriseSearchContentEnrichmentConfiguration –SearchApplication $ssa –ContentEnrichmentConfiguration $c

Please remember to use the correct URL for the service.

Save & Run. If no errors, your service is installed successfully.

Step 8: Perform Full Crawl

Open Central Administration & Perform Full Crawl for the following content sources.

1. Web content source for www.sharepointcto.com

2. Web content source for www.jeanpaulva.com

Step 9: Add Refiners to Result Page

Open the Enterprise Search Center result page, bring the page to edit mode, edit the refiner web part & add the WebType refiner. You can view References section on how to add Search Refiners.

Step 10: Test Search

Open the Enterprise Search Center Site & Try searching for content. You can see the Web Type refiner appearing & try clicking on the values.

image

If the result is filtered based on Blog or Site values, it means the Refiners are working correctly.


As the Content Enrichment Web Service will be called for all the Content Sources, Performance can become sluggish as there is a delay involved in the service invocation. It is recommended that we should deploy the service closer to the SharePoint system. Alternatively, one can try Asynchronous mode too.

We can also debug the service. Ensure the Service is running & set breakpoints.

image

References

http://msdn.microsoft.com/en-us/library/office/jj163982(v=office.15).aspx

http://www.jeanpaulva.com/index.php/2014/04/20/search-refiners/

Summary

In this article we have explored Content Enrichment Web Service. The source code & script is attached along with for download.

Posted in SharePoint 2013 | Tagged: , , | Leave a Comment »

DocKit – File migration to SharePoint 2013

Posted by Paul on May 18, 2014

In this post we can have an overview on DocKit – File Migration tool for SharePoint 2013. 

Why we need a File Migration Tool?

Upon times we might require to upgrade an old content management system to SharePoint.  In most cases we can isolate the documents inside the CMS as files & then migrate to SharePoint.

Metadata

After migrating the files, we might require to map the custom metadata properties of source system.
The Tool DocKit provides this facility.

 

Download

You can download the tool from following link:

http://www.vyapin.com/products/sharepoint-migration/dockit/sharepoint-migration-tools.htm

Screenshots

Screenshots of the tool are given below.

image

Choose the New Task option.

clip_image001

Choose the source folder and destination library.

clip_image002

Choose the metadata file.

clip_image003

I am using the following file which have a required-column named Path and items are mapped through the source file path.

image

Click the Finish button in wizard for the migration to take place.

clip_image005

Options available to exclude sub-folder structure.

clip_image006

You can see the files are copied with metadata.

image

Metadata

The metadata file should be generated using your custom logic.

Summary

The tool is very efficient in doing migration of files & setting metadata.  But the price $1700 seems to be little above the upper-band.

Posted in SharePoint, SharePoint 2013 | Tagged: , , | Leave a Comment »

Thesaurus

Posted by Paul on May 16, 2014

In this article we can explore Thesaurus & its configuration in SharePoint 2013 Search.

What is Thesaurus?

Thesaurus is Synonym which means equivalent words.

image

Why do we need Thesaurus?

Users might find difficulty in typing lengthy search texts like:

1. Human Resource

Instead, they can use pre-configured Thesaurus like:

1. HR

2. HRA

How we specify Thesaurus to SharePoint 2013 Search?

First we need to create a comma-separated Thesaurus CSV file like below.

Key,Synonym,Language

HR,Human Resources,en

HRA,Human Resources

The language parameter is optional.

How to configure Thesaurus?

We need to use PowerShell scripts to configure Thesaurus.

Practical

Let us try to configure Thesauri’s as an exercise.

Step 1: Initial Empty Search

Try searching for HRA and ensure you are receiving no results.

image

This confirms there are no content matching the text HRA.

Step 2: Create Thesaurus file

Create a CSV file with the following content.

Key,Synonym,Language

HR,Human Resources

HRA,Human Resources

Save the file.

Step 3: Install the Thesaurus file

Run the following PowerShell script to install the Thesaurus file.

# Add PowerShell Snapin

if ((Get-PSSnapin “Microsoft.SharePoint.PowerShell” -ErrorAction SilentlyContinue) -eq $null)

{

Add-PSSnapin “Microsoft.SharePoint.PowerShell”

}

$searchApp = Get-SPEnterpriseSearchServiceApplication

Import-SPEnterpriseSearchThesaurus -SearchApplication $searchApp -Filename “\serverc$tempfile.CSV”

The path should be in UNC format. Please change the Server & File names appropriately.

If the installation succeeded, you will get the following message.

image

Step 4: Test the Search

Back in SharePoint; repeat the search using text HRA. You should receive the following results.

image

This confirms successful configuration of Thesaurus. Please note that the results are immediate.

image

Please note that I have configured content sources to www.jeanpaulva.com. This makes the content text Human Resources available.

References

http://technet.microsoft.com/en-us/library/jj219579(v=office.15).aspx

Summary

In this article we have explored Thesaurus configuration.

Posted in SharePoint, SharePoint 2013 | Tagged: , , , , , | Leave a Comment »

Search Crawling Error : The content for this address was excluded by the crawler because this item was marked with a no-index meta-tag. To index this item, remove the meta-tag and recrawl.

Posted by Paul on May 15, 2014

While setting Content Sources in SharePoint 2013, especially External Web content sources, one may encounter following errors.

I had faced the error while configuring web content source for my blog:

http://www.jeanpaulva.com

I had configured Crawl Rules to include domain/*.  But still the error happened.

The content for this address was excluded by the crawler because this item was marked with a no-index meta-tag. To index this item, remove the meta-tag and recrawl.

error blog

As the content is able to parse inner URLs, we can discard the chances of Firewall & Antivirus blockages.

Solution

The error essentially may not depend on the Source URL; It can be caused by the Crawling Machine configuration as well.

Following are the fixes you can try one by one:

Solution 1 Check robots.txt

Open your URL/robots.txt & Ensure there are no blocking verbs.

For example a fully-liberal robots.txt looks like below:

image

Solution 2 Check meta tags

View the source of the HTML page & ensure no blocking tags like below are there:

image

You can even discard the META tags Or create new tag with INDEX or FOLLOW values.

Solution 3 Check Crawling Machine & Crawl Credentials

Open your Crawling Machine (If in Farm) using the Crawl Credentials.  You can find it from Search Service Application

image

Try accessing the URL in the browser. If any extra login prompts appears, you need to increase the permissions for Crawling Account.

Solution 4 Turn Off IE Enhanced Security Configuration

image

Restart your machine after this. (If still unresolved, restart all servers in farm & retry)

Solution 5 Lower Internet Explore Security Configuration

Open your Crawling Machine & Lower the Internet Explorer Security settings.

image image image

Restart your machine after this. (If still unresolved, restart all servers in farm & retry)

Solution 6 Re-create Search Service Application

Go to Central Administration, Delete & Re-create the new Search Service Application.

Solution 7 Run Fiddler & Check ULS Logs

You can experiment with Fiddler in examining the underlying request/response.

http://www.telerik.com/fiddler

You can also check ULS Logs with Verbose mode turned on.

Solution 8 Run Cumulative Updates

Find the latest cumulative updates for SharePoint 2013

Solution 9 Update SharePoint with Service Pack

The latest service pack for SharePoint Server 2013 is available at:

http://www.microsoft.com/en-us/download/details.aspx?id=42544

Solution 10 Contact Microsoft Support

If you have Paid Support, Contact Microsoft for fxing this.

References

http://googlewebmastercentral.blogspot.com/2007/03/using-robots-meta-tag.html

Summary

In this post we have explored a weird content source crawling issue & possible solutions to fix that.

Posted in SharePoint, SharePoint 2013 | Tagged: , , , | Leave a Comment »

Clear Crawl Contents

Posted by Paul on May 12, 2014

In this article we can explore how to clear the crawled contents.

When we need to Clear Contents?

We need to clear contents on:

  1. Starting a new search content index store
  2. Remove unwanted or obsolete search content

How to perform Clear?

We can use the Central administration > Reset Index page to perform the same.

Steps

Following are the steps involved.

Open Central Administration > Manage service applications

image

Click on the Search Service Application

image

Click on the Index Reset link

image

In the appearing page choose Reset Now button

image

There you are! The index database is cleared.

Confirmation

You won’t get any results while you search.

image

Summary

In this post we have explored how to clear the indexed search contents.

Posted in SharePoint, SharePoint 2013 | Tagged: , , , | Leave a Comment »

Fiddler 2 is available now!

Posted by Paul on May 8, 2014

Fiddler is a Free HTTP debugging tool.

Download

You can download Fiddler from the following location:

http://www.fiddler2.com

image 

Click on the Download button available there. You will get the following page.

image

You can download the Right Version according to your .Net installation.

Installation

You can run the setup file & after Installation, Fiddler looks like below:

image

How it works?

Fiddler adds a hook to the Windows WinINET and can interpret all HTTP communications passing through the computer.

Starting with Fiddler

For starting with you can clear the existing sessions.  Choose the Remove All option for it.

image

Now open a new browser & Enter http://www.bing.com

image

You can see that Fiddler automatically updates the requests.

Reading Request and Response

Double click on the first URL and you can see the right hand pane have 2 sections opened.

image

In cases of response text view is not showing textual data, You can click the yellow-ribbon to transform it.

image

After transforming the contents.

image

We can also use the View in Notepad button to open the content in notepad.

Essential Features

Following are the essential features of Fiddler:

  1. HTTP Statistics Observation
  2. Request scanning
  3. Response scanning
  4. Cookie Verification
  5. Multiple View support

More Features

Following are the additional features to explore with:

  1. Combined Instrumentation of Requests

Internet Troubleshooting Tip

In case if you experienced Internet Connectivity Issues while Fiddler have crashed, You can start another instance of Fiddler and Close it.  This will restore the connectivity as Fiddler Proxy will be safely removed only on closing.

Posted in SharePoint, SharePoint 2010, SharePoint 2013 | Tagged: , , | Leave a Comment »

Configure Bing Search

Posted by Paul on May 7, 2014

In this article we can explore how to configure Bing Search in SharePoint.

What is Bing Search?

Bing Search in SharePoint allows searching in www.bing.com within SharePoint.

1. It requires Enterprise edition of SharePoint to configure this

What is the Advantage?

Users can use SharePoint as a Central Page to search multiple search engines.

How Bing Search is achieved?

We are using Federated Search to achieve this. Here the user search term is passed to Bing.com through Open Search protocol.

image

There are 2 types of Search in SharePoint. One is Indexed Search where the SharePoint Crawler periodically collects data of external systems & indexes them in SharePoint database.

The other one is Federated Search which can be used for systems where Indexing is not possible / time consuming / resource centric / result freshness required. In Federated Search, the user search term is passed to the third party search provider using Query strings & the result can be retrieved as RSS and will be formatted and displayed in SharePoint.

Steps

Following are the steps involved.

Step 1 Create Result Source

Open Central Administration > Manage service applications > Search Service Application > Result Sources page

image

Choose the New Result Source option.

Enter the following information:

1. Name Bing

2. Protocol Open Search

3. Search Term (no change)

4. Source Url http://www.bing.com/search?q={?searchterms}&format=rss

Save changes.

image

The query string q={?searchterms} passes the user-typed term in SharePoint to the Bing URL.

The query string format=rss emphasizes returning results as RSS feeds without the Bing HTML content.

image

Result sources limit searches to certain content or to a subset of search results. You can also use result sources to send queries to external providers such as Bing.

Step 2 Modify Search Result Page

Now we need to associate the Bing result source to a result page.

Create an Enterprise Search Center template & Open the result page.

image

Choose Page Settings > Edit Page & then Edit Search Results web part.

image

Choose the Change Query option.

image

Select the result source as Bing (our new result source)

image

Save changes to dialog, web part & page.

Check-in & Publish the page.

Step 3 Test Search

Now we are ready to test the search. Open the Enterprise Search Center site and run a query. You should be able to see results from bing.com.

image

This concludes our Federates Search using Bing.

image

In the example we have modified the default search result page of enterprise search center site. You may wish to revert the changes or delete & create another site.

image

Please note that Federated Search is possible only if the Provider enables OpenSearch compliant RSS feeds. You can see this in the provider site as shown below for Bing Search.

image

References

http://msdn.microsoft.com/en-us/library/office/cc806030(v=office.14).aspx

Summary

In this article we have explored how to configure Bing Search in SharePoint.

Posted in SharePoint, SharePoint 2013 | Tagged: , , , , | Leave a Comment »

Create Crawl Rule

Posted by Paul on May 3, 2014

In this article we can explore how to create a crawl rule in SharePoint 2013.

What is Crawl Rule?

Crawl rules coupled with Content Sources allows to:

1. Include a path during crawl

2. Exclude a path during crawl

3. Specify Credentials for a path

4. Set Wildcards like * and Regular Expressions

clip_image002

You can discard Crawl Rules if your Content Source is working first hand.

Steps

Follow the steps below to create a crawl rule.

Step 1: Open Crawl Rules

Open Central Administration > Service Applications > Search Service Application > Crawl Rules

clip_image004

Step 2: Create Crawl Rule

Choose the New Crawl Rule option & enter the details as shown below.

clip_image006

Please note that you need to include asterisk (*) to include the URLS.

By default exclude option is selected, you need to choose the Include option. Check the Follow Links, Complex URLs, SharePoint content as HTTP pages options too.

For external web sites you can use the Anonymous access.

Step 3: Test Crawl Rule

Now we can test our crawl rule. Here we are entering a lengthy URL and make sure it is being caught by our crawl rule.

clip_image008

Once the Test is confirmed, we can go ahead with Full Crawl.

References

http://technet.microsoft.com/en-us/library/jj219686(v=office.15).aspx

Summary

In this article we have explored how to create a crawl rule in SharePoint 2013.

Posted in SharePoint, SharePoint 2013 | Tagged: , , , | Leave a Comment »