Showing posts with label SPSearch. Show all posts
Showing posts with label SPSearch. Show all posts

Wednesday, January 29, 2014

SharePoint search error “SharePoint item being crawled returned error when attempting to download the item”

While working with SharePoint, I got an error in search service when I try to index a page having search results using for roll the content in site collection. My search service application and content source are working fine. After checking this error in logs and digging in to this error I found that we have to change User agent value.
To do that,

Open Registry editor (Run -> regedit) and navigate to “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\14.0\Search\Global\Gathering Manager” key.

Change the value of “User Agent” from “MSIE 4.01” to “MSIS 8.0” and restart SharePoint search service.

Thursday, December 26, 2013

Map crawled property to a managed property in SharePoint search

In SharePoint search, we can map crawled properties with managed properties. We can map the properties by using the steps below,

Navigate to Site settings page in SharePoint site collection and click on Search schema in Site collection Administration section.

In Site Collection Administration – Managed Properties page, enter the Managed property name in Managed property text box to search. Select the property, click on Edit/Map property option.

In Edit Managed Property page, “Mappings to crawled properties” section, select “Include Content from all crawled properties” option and click on “Add a Mapping” button.

In crawled property section dialog box, Search for a crawled property name field, enter the property name and click on “Find” button to search for the property.

We can the properties in “Select a crawled property” box. Select the properties and click on OK to save the settings.

Thursday, December 19, 2013

Configure custom search result type in SharePoint site collection

Search result type is a rule that displays the search results in different ways. It will consist conditions that compare the search results. It also consists display template to use search results to meet the conditions.
To configure custom search result type we have to follow the steps below,
Navigate to Site Settings page, click on Search Result types in Site Collection Administration section.

Click on New Result Type to create new result type in Manage Result Types page.

We’ll navigate to Add Result Type page. In Add Result Type page Enter the name in “Give it a name” text box in General Information Section.

In Conditions section, we can specify source in “Which source should results match?” drop down. In What types of content should match? You can skip this rule to match all content” drop down allows us to specify the matched content. Here we have options to add more values by clicking on “Add Value” link.

In “Show more conditions” section, we can specify we can specify conditions for the search by specifying the values in “Which custom properties should match?” section.

In “Actions” section, “What Should these result look like” dropdown we can select display type. By checking “Optimize for frequent use” check box to appear the results frequently in search results.

Wednesday, December 18, 2013

Import query suggestions in SharePoint search

In SharePoint search query suggestion allows users to enter the search terms easily by appearing the suggestion words under the search box. SharePoint automatically create the suggestions depending on the previous search history. We can create query spelling suggestions manually by exporting the query suggestions file.

We can create query suggestions by creating the new text file and adding the query spellings one word per a line.

Save the text file as .txt with UTF-8 encoding format.

To import query suggestions file in SharePoint site Navigate to Search Administration page in SharePoint central Administration (Application Management -> Manage Service Applications -> Search Service Application) and click on “Query Suggestions” link in quick launch Queries and Results section.

In Query Suggestion Settings page, , Select “Show search suggestions” check box and Select “Language for suggestion phrases” section select Language as “English”. In Always suggest phrases section click on “Import from text file” link to upload the text file. 

In “Import phrases for query suggestions” page, Text file with phrases section click on browse button to browse and add query suggestion text file created earlier, click on ok to save the settings. 

Tuesday, September 24, 2013

Set All Search boxes to use the search center in SharePoint 2013

In SharePoint Site search boxes will crawl the data from local sites. We can see “Expand your search” link that redirects the search center, whenever we configure the global search center in the application. We can configure the search boxes in site level and site collection level in site settings (Site Settings -> Site Collection Administration -> Search Settings) Site level (Site Settings -> Search -> Search Settings)

In SharePoint it is always not possible to modify in all the sites and site collections. Steve Mann wrote power shell commands to loop all the site collections and apply search center URL.

$webApp = Get-SPWebApplication “Web Application URL
foreach ($siteColl in $webApp.Sites)
    if ($siteColl -ne $null)
        $site = Get-SPWeb $ siteColl.Url      
        $site.AllProperties["SRCH_SB_SET_SITE"] = 
        $site.AllProperties["SRCH_ENH_FTR_URL_SITE"] = '/sites/SearchCenter/Pages'

Here SRCH_SB_SET_SITE, SRCH_ENH_FTR_URL_SITE are properties. We can find about more in these links