Author Archives: richardstk

Configure SharePoint 2013 Search Index Managed Property Sizes

If you check the crawl logs for SharePoint 2013 you may see warnings similar to those below:

The item has been truncated in the index because it exceeds the maximum size.

This item was partially parsed. The item has been truncated in the index because it exceeds the maximum size.

This item was truncated because the parsed output was greater than the maximum number of allowed characters.

Microsoft have detailed the SharePoint 2013 Search boundaries and limits here and I’ll show how these boundaries and limits relate to the warnings above.

The item has been truncated in the index because it exceeds the maximum size.

This message relates to the indexed managed property size and according to the aforementioned documentation “This is the default maximum size of a managed property that is set to either “searchable” or “queryable”.”  The property limit can be configured between 0 and 2048KB.

In order to change the limit open an elevated SharePoint 2013 Management Shell.  To get the current property value run the code below.

$p = Get-SPEnterpriseSearchMetadataManagedProperty -Identity body -SearchApplication (Get-SPEnterpriseSearchServiceApplication)
$p.MaxCharactersInPropertyStoreIndex

SMP0

 

To change the property value run the code below, substituting the value for your own requirements.

$prop1 = Get-SPEnterpriseSearchMetadataManagedProperty -Identity body -SearchApplication (Get-SPEnterpriseSearchServiceApplication)
$prop1.MaxCharactersInPropertyStoreIndex = “2048000”
$prop1.Update()

SMP1

 

This item was partially parsed. The item has been truncated in the index because it exceeds the maximum size.

This message  relates to the retrievable managed property size and according to the aforementioned documentation “This is the default maximum size of a retrievable managed property.”  The property limit can be configured between 0 and 2048KB.

In order to change the limit open an elevated SharePoint 2013 Management Shell.  To get the current property value run the code below.

$p = Get-SPEnterpriseSearchMetadataManagedProperty -Identity body -SearchApplication (Get-SPEnterpriseSearchServiceApplication)
$p.MaxCharactersInPropertyStoreForRetrieval

SMP2

 

To change the property value run the code below, substituting the value for your own requirements.

$prop2 = Get-SPEnterpriseSearchMetadataManagedProperty -Identity body -SearchApplication (Get-SPEnterpriseSearchServiceApplication)
$prop2.MaxCharactersInPropertyStoreForRetrieval = “2048000”
$prop2.Update()

SMP3

 

This item was truncated because the parsed output was greater than the maximum number of allowed characters.

This message relates to the parsed content size of the document.  This has a boundary limit of 2 million characters that can’t be increased.  Search stops parsing a document once the limit of 2 million characters has been reached and any content past this point isn’t included in the index.

Once you’ve configured the indexed managed property and retrievable managed property sizes you need to run a full crawl.

Advertisement

Search By Document ID In SharePoint 2013

The SharePoint Document ID Service is a Site Collection Feature which assigns unique IDs to documents within a Site Collection.  The unique document ID can be used to locate documents within a Site Collection irrespective of their location.  This is useful when documents may be moved around within a Site Collection due to work flows, or other processes.

To search by document ID, open the Service Service Application through Central Administration, then open the search schema, which is under Queries and Results.  Search for DocID in the managed properties box.

DocID0

 

The search results should return a managed property with the name DocID and the Query property should be enabled.  The property should be mapped to the crawled property ows_dlc_DocId.

The Query property enables the ability to search specifically by the property.  Open your search center and in the search box enter DocID:%DOCID% where you replace %DOCID% with the document ID for which you wish to search.

Here I have a document with the ID RSTST-7-144

DocID1

I have found the document using the search term DocId:RSTST-7-144

DocID2

 

Changing The Default Number Of Refiner Options In SharePoint 2013 Search

By default, SharePoint 2013 Search shows 5 options for each refiner, except result type, which has 6 options.

RefinerCount0

In order to change the number of options you need to edit the Filter_Default.html display template.  Do to this open Site settings, then Master pages and page layouts.  Drill through to  Display Templates -> Filters.  Download a copy of Filter_Default.html.

RefinerCount1Open Filter_Default.html in a text editor and find the two values below.

RefinerCount2

Change the values for shortListSize as required and save the file.  Upload the file to the document library where you downloaded the copy and overwrite the existing file.  Refresh the search page to see the change.

RefinerCount3

 

Hyper-V VM Stuck In Backing Up… State

In this post I’ll show how to resolve the issue of a VM that’s stuck in the “backing up…” state as shown by Hyper-V Manager, without having to reboot the virtual host.

BackingUp0

 

If a VM is stuck in the backing up… state it’s probably due to an error with the Microsoft Hyper-V VSS Writer.  Open an elevated command prompt and run “vssadmin list writers”.  The output should look like it does below, with no errors listed.

BackingUp1

 

The Microsoft Hyper-V VSS Writer runs within the Hyper-V Virtual Machine Management service, so in order to restart the VSS writer and clear the error, you have to restart the Hyper-V Virtual Machine Management service.  I’ve restarted this service without any issues, but please test this on a test server first.

BackingUp2

You can restart the service from the Services mmc, but if the Hyper-V VSS Writer is in an error state the service may hang on shutdown, in this case you’ll have to kill the vmms.exe process from Task Manager.

BackingUp3

When you do this VMs will disappear from Hyper-V Manager, but will reappear when you restart the Hyper-V Virtual Machine Management service.  Following the service restart the VM should no longer by in a backing up… state.

 

SharePoint 2013 Content Search Web Part: One or more of the following resource files failed to load

When adding the Content Search Web Part to a site for the first time, the web part took a while to load, then displayed the error:

One or more of the following resource files failed to load: /_catalogs/masterpage/display templates/language files/en-GB/customstrings.js?ctag=322$$15.0.4569.1000

CSWP0

To look for the missing file I went to Site Settings, then Master page and page layouts, which is under the heading Web Designer Galleries.  On that page I navigated through Display Templates -> Language Files.  I could see that for some reason the en-GB folder was missing.

CSWP1

The fact that the folder was missing was odd because I’d used the Content Search Web Part before within the Site Collection.  Anyway, to resolve the error I created the en-gb folder and copied customstrings.js from the en-us folder and pasted it into en-gb.

CSWP2

Switching Language In SharePoint 2013

In SharePoint 2010 it was easy to switch between languages using the user menu within SharePoint.  To switch language In SharePoint 2013 open Control Panel -> Language and click Add a language.

Language

Once you’ve added the required languages switch between them by moving the language you want to use to the top of the list.

Language2

Close and re-open your browser for the change to be recognised.

Language3

Re-Size The Distributed Cache Service In SharePoint 2013

When you install SharePoint Server 2013 the Distributed Cache service is configured to use 10% of the RAM on the server.  Half of the 10% is used for caching and the other half is used for memory management.  If you add RAM to the server you need to manually re-configure the Distributed Cache service to make use of the extra RAM.

To check the current RAM allocation run the command below from an elevated SharePoint 2013 Management Shell, replacing the server name as necessary.

Use-CacheCluster
Get-AFCacheHostConfiguration -ComputerName ServerName -CachePort “22233”

Distributed Cache Service 1

Calculate the new Distributed Cache service cache size for a 24 GB SharePoint Server as follows:

10% of 24 GB = 2.4 GB

Divide 2.4 GB by 2 = 1.2 GB

Convert 1.2 GB to MB = 1229 MB

Stop the Distributed Cache service on each host using Central Administration -> System Settings -> Manage services on server.

Run the command below from an elevated SharePoint 2013 Management Shell on one host at a time, replacing the cache size as necessary.

Update-SPDistributedCacheSize -CacheSizeInMB CacheSize

Start the Distributed Cache service on each host using Central Administration -> System Settings -> Manage services on server.

 

 

SCVMM 2012 R2 – Dynamic Optimization Cannot Be Performed At This Time

When trying to run the Optimize Hosts wizard within SCVMM 2012 R2 I received the error “Dynamic Optimization Cannot Be Performed At This Time” and “Object reference not set to an instance of an object”.

The Application Event Log on the SCVMM server contained a Windows Error Reporting event from the same time.  Opening the event showed a link to the error log.

SCVMMDO0

 

Opening the error log showed that the error was related to a logical network issue on the cluster.  This cluster has a converged network switch to which all virtual machines (VMs) connect.  However, two additional logical networks are mapped to the switch to enable the migration of VMs which were connected to logical networks of a different name on a legacy cluster.

SCVMMDO1

What I found is that some VMs were connected to the “Hyper-V External Access ” logical networks, rather than the ConvergedNetworkSwitch.  Changing the network mapping of the affected VMs to ConvergedNetworkSwitch enabled me to run the Dynamic Optimization wizard.

SCVMMDO2

Enable SharePoint 2013 Integrated SSRS To Send Email Alerts

SQL Server Reporting Services (SSRS), when integrated into SharePoint 2013 enables reports to be sent to users via email.  From the report click Manage Subscriptions.

SharePointSSRS1On the following screen click Add Subscription.  You can configure the report options and click OK to save.

SharePoint SSRS2

If you’ve not configured SSRS you may receive an error in the Application Event log on the SharePoint server hosting the SSRS service application.  This could take the form:

The Report Server Email extension failed to read its configuration settings from the rsreportserver.config configuration file. The extension is not available to users. (Application: SQL Server Reporting Services Service Application, CorrelationId: …)

The web page may also fail to load, with an error like the one below.

SharePoint SSRS3

If you encounter this error, open the SQL Server Reporting Services Service Application from Central Administration.  Next, open e-mail settings and configure the SMTP server.  Finally, open Provision subscriptions and alerts, enter the appropriate account details and click Ok.

SharePoint SSRS4