-->
Showing posts with label Sharepoint 2013. Show all posts
Showing posts with label Sharepoint 2013. Show all posts

Thursday, 20 August 2015

Display the Calendar Using Jquery Full Calendar and SharePoint Rest API


In this post I will show you how to create your own Jquery Calendar view using the simple Jquery and SharePoint Rest API. I have used the Jquery full calendar plugin as it is very easy to use. It is highly customizable and very light weight.

I have created a Calendar list in my site and named it as ‘UpcomingEvents’. We will use this list to store our events or meetings.

You will required to add the reference to the following files from FullCalendar.io 


 <link href="../SiteAssets/css/fullcalendar.css" rel="stylesheet"/>  
 <link href="../SiteAssets/css/fullcalendar.print.css" rel="stylesheet" media='print' />  
 <script type="text/javascript" src="../SiteAssets/js/jquery-1.11.0.min.js" ></script>  
 <script type="text/javascript" src="../SiteAssets/js/fullcalendar.min.js" ></script>  
 <script type="text/javascript" src="../SiteAssets/JqueryFullCalendar.js" ></script>  

Create JqueryFullCalendar.txt and add the above mentioned references in the file,

JqueryFullCalendar.txt


 <link href="../SiteAssets/css/fullcalendar.css" rel="stylesheet"/>  
 <link href="../SiteAssets/css/fullcalendar.print.css" rel="stylesheet" media='print' />  
 <script type="text/javascript" src="../SiteAssets/js/jquery-1.11.0.min.js" ></script>  
 <script type="text/javascript" src="../SiteAssets/js/moment.min.js" ></script>  
 <script type="text/javascript" src="../SiteAssets/js/fullcalendar.min.js" ></script>  
 <script type="text/javascript" src="../SiteAssets/JqueryFullCalendar.js" ></script>  
           <div id='calendar' class="float:left search-results"></div>  

Wednesday, 4 December 2013

SharePoint Multi-Language Variation Site


We will use the SharePoint Online variations feature to create multi-language site.
There will be a source site (most probably in English) where most of the authoring and creation of content will take place and there will be another target site (in your native language) which will be created with the help of 'Machine Translation Service'.
In the above figure it can be seen that we will first create a variation site in English and there will be target site in Hindi which will be auto generated from English.
First to begin please make sure we have following things in place,
  • Activate SharePoint Server Publishing Infrastructure feature on the ‘Root Site’ collection
  • ‘Root site’ is of type ‘Publishing Site’(in my case, http://sp2013labapp01/sites/demo )
  • Language Pack Hindi should be installed on all the Servers in SharePoint Farm

At the end of this article we will have 2 links,
  • Source Site in English: http://sp2013labapp01/sites/demo/en-us
  • Target Site In Hindi : http://sp2013labapp01/sites/demo/hi-in


Configure Variation Settings for your ‘Root Site’

In this step we will configure which and what things to create variation for.
  1. Go to Site Settings of your ‘Root Site’
  2. Click on ‘Variation Settings’
  3. Make sure the variation settings are as shown in the screenshot below
  4. These are the default settings and easy to go for this tutorial. Click on ‘OK’

Creating and Configuring Machine Translation Service in SharePoint 2013


To Use the Machine Translation service to create the multi-language feature of SharePoint 2013 we need to first make the ‘Machine Translation Service’ up and running in your farm.

So this article will outline on creating and configuring the machine translation service for SharePoint and in the next article I will outline the steps to create a multi-language site.

Creating Machine Translation Service

Open Central Administration, go to Application Management section, and choose Manage service applications.

On the ribbon, choose New, and then choose Machine Translation Service.


On the next page type a name for the service application and fill in the details as shown in the screens below


Thursday, 28 November 2013

Query Rules in SharePoint 2013




With the help of Query Rules in Sharepoint 2013 without any custom code we can promote a specific result or even change the ranked result by changing the query. Search Expert or the Search Manager of the organization has the freedom and power to change the search experience and adapt it to the organization needs. Defining the right keywords to be matched on the user queries and mapping the conditions with the relevant actions is easy but the process must undoubtedly be well managed. The management of the query rules should definitely be part of your SharePoint 2013 search governance strategy.

A query rule can specify the following three types of actions:
  • Add Promoted Results
  • Add one or more groups of results, called result blocks.
  • Change the ranking of results.

How to Add Query Rule:
Let’s take a scenario where organization is maintaining the list of glossary terms managed in the organization. When we search in google “meaning of activity”, it automatically recognizes that user wants to know the meaning of the word ‘activity’ and it highlights its meaning at top and displays the rest of the results in bottom.


SharePoint also provides this feature using ‘Query Rule’ feature.

SharePoint Crawls - Full, Incremental, Continuous


Full Crawl

Full Crawl of Content source will re index all the content from beginning

Important Points to Consider:
  • If new managed property has been introduced, we need to run Full Crawl of content source     
  • If new crawl rules are created/updated/deleted, Full crawl of content source is required
  • If incremental crawl has been failed
  • If software update or service pack has been installed on the servers
  • Expensive in terms of performance issues


Incremental Crawl

Incremental Crawl of Content source will only process those items which are changed since the last crawl happened.

Important Points to Consider:
  • Most preferred after the full crawl has been done.
  • Does not hamper the performance as it will crawl only modified documents not the entire content source.
  • The incremental crawl will retry items and postpone crawling the item if the error persists.


A limitation with the Full Crawl and Incremental Crawl is we cannot schedule both to execute parallel. For example if the Full Crawl is already running then the Incremental Crawl cannot be triggered until the Full Crawl completes, if you try to Stop Full Crawl then also it is mandatory to finish at least once successful Full crawl before triggering any Incremental Crawls.

So Microsoft has come up with the concept of Continuous Crawl

Continuous Crawl

With Continuous Crawl you can maintain the content index as fresh as possible.               
    More than one continuous crawl can run in parallel
    one deep change will not result in degraded freshness on all following changes

The impact of a "Continuous Crawl" is the same as an incremental crawl.

At the parallel execution of crawls, the "Continuous Crawl" within the parameters defined in the "Crawler Impact Rule" which controls the maximum number of requests that can be executed by the server (default 8).

The SharePoint Server Publishing Infrastructure feature must be activated at the site collection level before the Publishing feature can be activated.

While creating a new search site in my site collection I got this error!


You might get this error while creating Business Intelligence Center site

Resolution:

Activate publishing at the site collection level


1.       From the root of your site collection, click Settings Small Settings gear that took the place of Site Settings. > Site settings.
2.       On the Site Settings page under Site Collection Administration, click Site collection features.
3.       On the Site Features page, scroll down to SharePoint Server Publishing Infrastructure and click Activate.

Once publishing features are activated, sub sites inherit them automatically. But, if you built a site before activating the publishing infrastructure, you’ll have to manually activate it for each site.


Activate publishing at the site level


1.       From any page within the site, click (gear icon) Settings Small Settings gear that took the place of Site Settings. > Site settings.
2.       On the Site Settings page, in the Site Actions section, click Manage site features.
3.       On the Site Features page, next to SharePoint Server Publishing, click Activate.


Using Powershell


Execute the below command in SharePoint Management Shell

Enable-SPFeature -Identity PublishingSite -Url http://sp2013labapp01/

Enable-SPFeature -Identity PublishingWeb -URL http://sp2013labapp01/



Happy Sharepointing !

Thursday, 5 September 2013

Sharepoint 2013 - Working with Thesaurus And Synonyms

I wanted that my search center should return the results with the synonyms for the particular search keyword. I tried to do it the way we do in Sharepoint 2010.
Locate the thesaurus file from %ProgramFiles%\Microsoft Office Servers\14.0\Data\Office Server\Applications\GUID-query-0\Config, where GUID is the GUID of the new Search service application. Something like mentioned here.

It was pretty good where we had two functionalities "Replacement Sets" & "Expansion Sets", But for Sharepoint 2013 these they have eliminated it.

Below are the steps to do that in Sharepoint 2013
 1. Create a thesaurus file
 2. Install the Thesaurus file
 3. Check the results

 1. Create a thesaurus file
 Create a .csv file with the columns Key, Synonym and Language.
Key - Term (single or multiple words) that you want to trigger a synonym for when the term occurs in a query
Synonym - Synonym (single or multiple words) that you want to add to the query if the term specified in the Key column occurs in a quer
Language(Optional) - Abbreviation for the language for which the synonym should apply

This is how my thesaurus.csv file will look.


 2. Install the thesaurus File
 This can be done using powershell

$searchApp = Get-SPEnterpriseSearchServiceApplication
Import-SPEnterpriseSearchThesaurus -SearchApplication $searchApp -Filename <Path>

<Path> specifies the full UNC path of the .csv file (the thesaurus) to be imported.

3. Check The Results
As you can see in the figure, whenever i want to search for "Internet Explorer" it should return the results with "IE" or "IE5" or "IE6" or "IE7"


One more thing to note over here is, if i search for "IE" or "IE5" or "IE6" or "IE7" it will return only that particular results.


Key Points:
  1. I find the new approach in SharePoint 2013 a bit cumbersome, only good thing about it was power shell support and it does not require restart of Search service
  2. It does not have Replacement Set option, so we cannot replace the keyword search with our option. For example, I cannot replace the search with "NT5" keyword search with the "Windows 2000" and "W2K". Which was possible with SharePoint 2010
  3. It is not as extensible as expansion set. Here only one to one mapping is possible. For example, i had to write 4 entries to include the search for IE5,IE6,IE7 and IE when user searches for "Internet Explorer"
Happy Sharepointing !

Please do Share/Like/Comment if this article was helpful.

Sharepoint 2013 - Query Spelling Suggestions

Query Spelling Suggestions

When searching we sometimes spell words incorrectly. We often see it in Google, Did you mean: Sharepoint ? One of the features of SharePoint 2013 Search are Query Spelling Suggestions that process the words from the search query and control if they are spelled correctly.
In Sharepoint 2013 it is controlled using Query Spelling Suggestions, it will look something like this


There are two types of Query spelling suggestions works with two types of spelling dictionary viz Static and Dynamic mode
Dynamic - The query spelling correction uses the content-aligned dictionary
Static - The query spelling correction uses the out of the box static spelling dictionaries

You can configure the dictionary mode using the following command

$ssa = Get-SPEnterpriseSearchServiceApplication
Get-SPEnterpriseSearchQuerySpellingCorrection -SearchApplication $ssa

Set-SPEnterpriseSearchQuerySpellingCorrection -SearchApplication $ssa -SpellingDictionary Static

Query Spelling Exclusions and Query Spelling Inclusions:
SharePoint 2013 uses two Global Term Sets called Query Spelling Exclusions and Query Spelling Inclusions to define the query spelling suggestions.
1. Query Spelling Exclusions - Term Sets/Words that you never want to be suggested.
2. Query Spelling Inclusions - Term Sets/ Words that you want to be suggested

For Eg : If user searches for 'Dhawal' you know that it's incorrect spelling, so this word you can enter it in the Query Spelling Inclusions as shown below


So here whenever user searches for the 'Dhawal', 'Dhavall' or 'Dhawall', Search will ask if Did You Mean 'Dhaval'

Note : You will have to execute 'Search Custom Dictionaries Update' Timer Job so that your query spelling suggestions are reflected.