<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Search Space</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/nadeemis/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/nadeemis/feed.xml</link>
    <description>Search - SharePoint - ASP.NET - Development</description>
    <lastBuildDate>Sun, 12 Apr 2015 20:54:11 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Manually adding Search Query Suggestions in SharePoint 2013 using PowerShell</title>
      <link>https://docs.microsoft.com/archive/blogs/nadeemis/manually-adding-search-query-suggestions-in-sharepoint-2013-using-powershell</link>
      <pubDate>Thu, 20 Dec 2012 07:04:00 GMT</pubDate>
      <dc:creator><![CDATA[Nadeem Ishqair - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/nadeemis/2012/12/20/manually-adding-search-query-suggestions-in-sharepoint-2013-using-powershell/</guid>
      <description><![CDATA[One of the cool features that existed in SharePoint 2010 and has been further enhanced in SharePoint...]]></description>
      <content:encoded><![CDATA[<p><span style="font-size: medium;"><span style="font-family: Calibri;">One of the cool features that existed in SharePoint 2010 and has been further enhanced in SharePoint 2013 is Query Suggestions.</span><span style="font-family: Calibri;">&nbsp;</span></span></p>
<p><span style="font-family: Calibri; font-size: small;"><span style="font-family: Calibri; font-size: small;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/39/86/1541.query_suggestions_1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-86/1541.query_5F00_suggestions_5F00_1.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/39/86/1541.query_suggestions_1.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-86/1541.query_5F00_suggestions_5F00_1.png" alt="" border="0" /></a></span></span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">Query suggestions are suggested terms that appear in a list view below the Search box while the user is typing a query. Query suggestions are automatically generated for a query when users click a result for that same query at least 6 times. The clicked result does not need to be the same one, but can be any result that was returned for the query. Users&rsquo; clicks on results are logged and entry pairs of (query, result) are added to the Analytics Link Store DB, specifically to the MSSQLogPageClick table.</span></span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">Then on a daily basis, the SharePoint timer job titled &ldquo;Prepare Query Suggestions&rdquo; fires off to analyze and process the logged queries and clicks to prepare query suggestions.</span></span></p>
<p><span style="font-family: Calibri; font-size: medium;">&nbsp;</span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">The default OOTB behavior for generating query suggestions depends on users' actually performing searches in the Search Center and clicking on documents. For new deployments of SharePoint, this would mean that we are going to start clean and it might take a while until query suggestions start showing up for us. Enterprises have a wide set of domain specific terms that would be very useful to be used as a seeding collection for query suggestions, or simply query phrases that are considered so important that should always be suggested to users regardless of being searched for previously by other users. Also, in upgrades, we already have a bunch of terms from query logs that we want to use in the new SharePoint 2013 solution.</span></span></p>
<p><span style="font-family: Calibri; font-size: small;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/39/86/3323.query_suggestions_2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-86/3323.query_5F00_suggestions_5F00_2.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/39/86/3323.query_suggestions_2.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-86/3323.query_5F00_suggestions_5F00_2.png" alt="" border="0" /></a></span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">So, how can we manually add query suggestions in SharePoint 2013? One way is to import a text file populated with our suggestions using the Query Suggestion Settings page under Central Admin -&gt; Search Service Application. The procedure for using this page is described stepwise on this </span><a href="https://technet.microsoft.com/en-us/library/jj721441.aspx"><span style="color: #0563c1; font-family: Calibri;">page</span></a><span style="font-family: Calibri;"> on TechNet. </span></span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">&nbsp;</span><span style="font-family: Calibri;">&nbsp;</span></span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">To automate the procedure of adding Query suggestions, we&rsquo;re going to use PowerShell. There are actually two ways to do this: </span></span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<p><span style="font-family: Calibri; font-size: 11pt; font-weight: bold;">1. Using the <a href="https://technet.microsoft.com/en-us/library/jj219665.aspx">Import-SPEnterpriseSearchPopularQueries</a> cmdlet</span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">This allows you to import a text file containing your query suggestions and has basically the same effect as using the Query Suggestion Settings Admin page in Central Admin. </span></span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">Looking more closely at this cmdlet, we investigate the following two parameters of special interest.</span></span></p>
<p><span style="font-family: Calibri; font-size: medium;">&nbsp;</span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;"><strong>ResultSource</strong>: This is a pointer to a Search Result Source where your suggestions will show up to users. As an example, if you specify &ldquo;Local SharePoint Results&rdquo; as the result source, suggestions will only show up when searching in the context of that result source.</span></span></p>
<p><span style="font-size: medium;"><strong><span style="font-family: Calibri;">&nbsp;</span></strong></span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;"><strong>Web</strong>: This is the SPWeb were your suggestions will be scoped at. Say you specify the Web of your Enterprise Search Center here, suggestions will only show up when in context of that web, sub web sites or other web sites within the same site collection will not automatically inherit query suggestions from the parent site.</span></span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">The main difference between using this cmdlet and the Query Suggestion Settings page for importing a text file with Query suggestions, is that suggestions uploaded using the Query Suggestion Settings page will always be scoped at a Search Service Application level, meaning that suggestions will be listed for users across all site collections and web sites using the same Search Service Application. While if using the cmdlet, you must specify a Web as the scope.</span></span></p>
<p><span style="font-family: Calibri; font-size: medium;">&nbsp;</span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">Ok, let&rsquo;s look at how the <em>Import-SPEnterpriseSearchPopularQueries</em> cmdlet can be used.</span></span></p>
<p>&nbsp;</p>
<div style="margin-left: 20px; padding: 10px; font-family: Consolas,courier new,courier; border: 1px solid #e1e1e1; overflow: scroll;">
<pre>$ssap = Get-SPEnterpriseSearchServiceApplicationProxy</pre>
<pre>$web = Get-SPWeb -Identity http:<span class="rem">//hostname/[site]</span></pre>
<pre>$owner = Get-SPEnterpriseSearchOwner -Level SPWeb -SPWeb $web</pre>
<pre>$manager = New-Object Microsoft.Office.Server.Search.Administration.Query.FederationManager &ndash;ArgumentList $ssap</pre>
<pre>$source = $manager.GetSourceByName(<span class="str">"Local SharePoint Results"</span>, $owner)</pre>
<pre>Import-SPEnterpriseSearchPopularQueries -SearchApplicationProxy $ssap -Filename C:\query-suggestions.txt -ResultSource $source -Web $web</pre>
<pre>$tj = Get-SPTimerJob -type <span class="str">"Microsoft.Office.Server.Search.Administration.PrepareQuerySuggestionsJobDefinition"</span></pre>
<pre>$tj.RunNow()</pre>
</div>
<p>&nbsp;</p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">My query-suggestions.txt file looks like this:</span></span></p>
<div style="margin-left: 10px; padding: 10px; font-family: courier new,courier; border: 1px solid #e1e1e1;">SharePoint,100,80,1033<br /> Search,10,70,1033<br /> Windows 8,10,70,1033<br /> Enterprise Search,90,50,1033</div>
<p>&nbsp;</p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">Where each line consists has this format: </span></span></p>
<p><span style="font-size: medium;"><em><strong><span style="font-family: Calibri;">[Query Suggestion Terms,Query Count,Click Count,LCID]</span></strong></em></span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<p><span style="font-family: Calibri; font-size: 11pt; font-weight: bold;">2. Using the <a href="https://technet.microsoft.com/en-us/library/ff608062.aspx">New-SPEnterpriseSearchLanguageResourcePhrase</a> cmdlet</span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">This allows you to add a single language resource entry at a time. </span></span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">The types of language resource phrases available are:</span></span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">- </span><span style="font-family: Calibri;">QuerySuggestionBlockList &ndash; a query suggestion entry that will be blocked from showing up. For example secret codes, offensive words, etc&hellip;</span></span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">-</span>&nbsp;<span style="font-family: Calibri;">QuerySuggestionAlwaysSuggest &ndash; a query suggestion that will always be shown. Ie. it is not personal to specific user.</span></span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">-</span>&nbsp;<span style="font-family: Calibri;">Nickname &ndash; Used for mapping synonyms for people names.</span></span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">-</span>&nbsp;<span style="font-family: Calibri;">QuerySuggestionSubstitution &ndash; Used for mapping terms. For example, if the phrase is &ldquo;car&rdquo;, you can add a mapping to &ldquo;car or auto&rdquo;. The phrase &ldquo;car&rdquo; will show up as the suggestion, but when the user selects that suggestion, the actual query will be &ldquo;car or auto&rdquo;.</span></span></p>
<p><span style="font-family: Calibri; font-size: medium;">&nbsp;</span><span style="font-size: medium;"><span style="font-family: Calibri;">Looking&nbsp;at theavailable parameters on this cmdlet, we notice the following two parameters which grab attention:</span></span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;"><strong>Owner</strong>: Specifies the scope at which the corresponding language resource phrase is created. </span></span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">The available scopes are: SPWeb, SPSite, SPSite Subscription and SSA.</span></span></p>
<p>&nbsp;<span style="font-size: medium;"><span style="font-family: Calibri;"><strong>SourceId</strong>: Specifies the Id of the Search Result Source where the language resource pharse will be applied to. This is an optional parameter, so if this is not provided when running the cmdlet, the language resource phrase will be applied to all result sources.</span></span></p>
<p>&nbsp;</p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">The difference between the two cmdlets, is that the second one does not require an SPWeb as a parameter, hence you can create Query suggestions that can be scoped at different levels. You can scope a suggestion to a site collection, web site or Search Service Application. </span></span></p>
<p><span style="font-family: Calibri; font-size: medium;">&nbsp;</span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">Following, we look at some example runs of the <em>New-SPEnterpriseSearchLanguageResourcePhrase</em> cmdlet.</span></span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">Adding a query suggestion at the SiteCollection level, will allow the query suggestion phrase to show up under all Webs within the site collection.</span></span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">If we don&rsquo;t specify the SourceId parameter, the suggestions will be applied to all result sources and show up when searching under any of the verticals in the Enterprise Search Center.</span></span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<div style="margin-left: 20px; padding: 10px; font-family: Consolas,courier new,courier; border: 1px solid #e1e1e1; overflow: scroll;">
<pre>$spsite = Get-SPSite -Identity https://hostname</pre>
<pre>$ssa = Get-SPEnterpriseSearchServiceApplication</pre>
<pre>$owner = Get-SPEnterpriseSearchOwner -Level SPSite -SPWeb $spsite.RootWeb</pre>
<pre>New-SPEnterpriseSearchLanguageResourcePhrase -Name "suggest me" -SearchApplication $ssa -Type QuerySuggestionAlwaysSuggest -Language "en-us" -Owner $owner</pre>
<pre>$tj = Get-SPTimerJob -type "Microsoft.Office.Server.Search.Administration.PrepareQuerySuggestionsJobDefinition"</pre>
<pre>$tj.RunNow()</pre>
</div>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<p><span style="font-size: medium;"><span style="font-family: Calibri;">Adding a query suggestion at a Web site level, will restrict the suggestion phrase to show up only under the specified web site.</span></span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<div style="margin-left: 20px; padding: 10px; font-family: Consolas,courier new,courier; border: 1px solid #e1e1e1; overflow: scroll;">
<pre>$spweb = Get-SPWeb -Identity https://hostname</pre>
<pre>$ssa = Get-SPEnterpriseSearchServiceApplication</pre>
<pre>$owner = Get-SPEnterpriseSearchOwner -Level SPWeb -SPWeb $spweb</pre>
<pre>New-SPEnterpriseSearchLanguageResourcePhrase -Name "suggest me" -SearchApplication $ssa -Type QuerySuggestionAlwaysSuggest -Language "en-us" -Owner $owner</pre>
<pre>$tj = Get-SPTimerJob -type "Microsoft.Office.Server.Search.Administration.PrepareQuerySuggestionsJobDefinition"</pre>
<pre>$tj.RunNow()</pre>
</div>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span></p>
<p><span style="font-family: Calibri; font-size: small;">&nbsp;</span><span style="font-size: medium;"><span style="font-family: Calibri;">In a future post, we&rsquo;ll see how suggestions are being fetched from the UI, and look at using the Search REST API to retrieve query suggestions.</span></span></p>]]></content:encoded>
    </item>
    <item>
      <title>SharePoint 2013 Search Query Tool Released on codeplex</title>
      <link>https://docs.microsoft.com/archive/blogs/nadeemis/sharepoint-2013-search-query-tool-released-on-codeplex</link>
      <pubDate>Fri, 09 Nov 2012 17:59:00 GMT</pubDate>
      <dc:creator><![CDATA[Nadeem Ishqair - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/nadeemis/2012/11/09/sharepoint-2013-search-query-tool-released-on-codeplex/</guid>
      <description><![CDATA[The Search Query Tool&nbsp;is a&nbsp;project I have been working on for a while now. And...]]></description>
      <content:encoded><![CDATA[<p>The <strong>Search Query Tool</strong>&nbsp;is a&nbsp;project I have been working on for a while now. And finally,&nbsp;I have reached the phase where it goes out to the world.</p>
<p>&nbsp;</p>
<p>This tool helps you understand and learn&nbsp;how the available&nbsp;parameters on the Search REST service should be formatted.</p>
<p>&nbsp;</p>
<p><span style="text-decoration: underline;">What does this tool offer:</span></p>
<ul>
<li>Issue HTTP GET or POST search queries.</li>
<li>See how the different Query parameters are formatted.</li>
<li>Authenticate using different users to debug security trimming issues.</li>
<li>Use against your tenant on SharePoint Online and authenticate using your&nbsp;SPO User&nbsp;ID.</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><span style="font-size: xx-large;">Go&nbsp;get it from:</span></p>
<p><span style="font-size: xx-large;"><a href="https://sp2013searchtool.codeplex.com/">https://sp2013searchtool.codeplex.com/</a></span></p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/39/86/6663.searchtool_capture2.PNG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-86/6663.searchtool_5F00_capture2.PNG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/39/86/6663.searchtool_capture2.PNG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-86/6663.searchtool_5F00_capture2.PNG" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/39/86/0451.searchtool_capture3.PNG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-86/0451.searchtool_5F00_capture3.PNG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/39/86/0451.searchtool_capture3.PNG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-86/0451.searchtool_5F00_capture3.PNG" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Big thanks go to my&nbsp;colleagues Dan G&oslash;ran Lunde and Murad S&aelig;ter for all the cool ideas&nbsp;and support.</p>
<p>As&nbsp;always, Enjoy!&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Tip - Handling HTTP 403 Forbidden when querying the Search REST Service using the PostQuery method</title>
      <link>https://docs.microsoft.com/archive/blogs/nadeemis/tip-handling-http-403-forbidden-when-querying-the-search-rest-service-using-the-postquery-method</link>
      <pubDate>Tue, 23 Oct 2012 13:47:00 GMT</pubDate>
      <dc:creator><![CDATA[Nadeem Ishqair - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/nadeemis/2012/10/23/tip-handling-http-403-forbidden-when-querying-the-search-rest-service-using-the-postquery-method/</guid>
      <description><![CDATA[&nbsp;Applies to: SharePoint 2013

This post is a continuation to my last one describing how to...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: Times New Roman; font-size: small;" face="Times New Roman" size="3">&nbsp;</span><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">Applies to: SharePoint 2013</span></span></p>
<p></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">This post is a continuation to my last one describing how to POST a search request to the postquery method in the Search REST API in SharePoint 2013.</span></span></p>
<p></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">When posting the request, you get a HTTP 403 Forbidden back in response from the Search service with an error message stating &ldquo;<em>The security validation for this page is invalid and might be corrupted. Please use your web browser's Back button to try your operation again.</em>&rdquo;</span></span></p>
<p></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">The reason for getting the 403 Forbidden status is mainly because you are missing an important header in your request which is the X-RequestDigest header.</span></span></p>
<p></p>
<p><span style="font-family: Calibri; font-size: small;" face="Calibri" size="3">&nbsp;</span><span style="text-decoration: underline;"><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">So what is the X-RequestDigest header all about? </span></span></span></p>
<p><span style="font-family: Times New Roman; font-size: small;" face="Times New Roman" size="3"> </span><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">This header contains an essential piece of information known as the form digest. The form digest is an object that is inserted into a page by SharePoint and is used to validate client requests. Validation of client requests is specific to a user, a site and time-frame.</span></span></p>
<p><span style="font-family: Times New Roman; font-size: small;" face="Times New Roman" size="3"> </span><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">SharePoint relies on the form digest as a form of security validation that helps prevent replay attacks wherein users may be tricked into posting data to the server.</span></span></p>
<p></p>
<p><span style="text-decoration: underline;"><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">Where do I get the form digest value to include in my request?</span></span></span></p>
<p><span style="font-family: Times New Roman; font-size: small;" face="Times New Roman" size="3"> </span><span style="font-family: Calibri; font-size: small;" face="Calibri" size="3">As described on <a title="How to: Complete basic operations using SharePoint 2013 REST endpoints" href="https://msdn.microsoft.com/en-us/library/jj164022(office.15).aspx" target="_blank">this page on MSDN</a>, you can retrieve this value by making a POST request with an empty body to </span><span style="color: #0563c1; font-family: Calibri; font-size: small;" face="Calibri" size="3" color="#0563c1">https://site/_api/contextinfo</span><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri"> and extracting the value of the &ldquo;d:FormDigestValue&rdquo; node in the XML that the contextinfo endpoint returns.</span></span></p>
<p><span style="font-family: Times New Roman; font-size: small;" face="Times New Roman" size="3"> </span>However, I have also noticed that issuing an empty body request to the postquery method itself in the Search Service endpoint at <span style="color: #0563c1;" color="#0563c1">https://site/_api/search/postquery</span> does return the form digest value as a header within the response. So, you can first issue an empty request to postquery, extract the X-RequestDigest header value from the response and use that in subsequent requests.</p>]]></content:encoded>
    </item>
    <item>
      <title>How-To: PostQuery in SharePoint 2013 Search REST API</title>
      <link>https://docs.microsoft.com/archive/blogs/nadeemis/how-to-postquery-in-sharepoint-2013-search-rest-api</link>
      <pubDate>Sat, 20 Oct 2012 15:32:00 GMT</pubDate>
      <dc:creator><![CDATA[Nadeem Ishqair - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/nadeemis/2012/10/20/how-to-postquery-in-sharepoint-2013-search-rest-api/</guid>
      <description><![CDATA[I have received several question from colleagues and through this blog about using the postquery...]]></description>
      <content:encoded><![CDATA[<p></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">I have received several question from colleagues and through this blog about using the </span><span style="font-family: courier new,courier;">postquery</span><span style="font-family: Calibri;" face="Calibri"> method in the SharePoint 2013 Search REST API to POST the search query.</span></span></p>
<p></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">Here, I would like to share how that can be achieved. Search in SharePoint 2013 is a key player, and many of the features in SharePoint 2013 are now based on Search as the enabling platform. In that regard, proper documentation about what can be achieved with Search is more important now than ever. Through this blog, I&rsquo;ll try to share any tips or tricks I come across, and I would kindly ask you to share any suggestions or requests you may have about topics you&rsquo;d like covered. </span></span></p>
<p></p>
<p><span style="font-family: Calibri; font-size: small;" face="Calibri" size="3">OK, enough of the talking, let&rsquo;s get back to the subject of this post. As noted in my previous post &ldquo;</span><a href="https://blogs.msdn.com/b/nadeemis/archive/2012/08/24/sharepoint-2013-search-rest-api.aspx"><span style="color: #0563c1; font-family: Calibri; font-size: small;" face="Calibri" size="3" color="#0563c1">SharePoint 2013 Search REST API</span></a><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">&rdquo; that describes the different methods and parameters available on the Search REST API, the </span><span style="font-family: courier new,courier;">postquery</span><span style="font-family: Calibri;" face="Calibri"> method can be used to POST the query to the service to overcome URI length restrictions when using the HTTP GET based method </span>query<span style="font-family: Calibri;" face="Calibri">.</span></span></p>
<p></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">The </span>postquery<span style="font-family: Calibri;" face="Calibri"> method takes a </span><span style="font-family: courier new,courier;">Microsoft.Office.Server.Search.REST.SearchRequest</span><span style="font-family: Calibri;" face="Calibri"> object as parameter. The </span><span style="font-family: courier new,courier;">SearchRequest</span><span style="font-family: Calibri;" face="Calibri"> class is an internal class in </span>Microsoft.Office.Server.Search.dll<span style="font-family: Calibri;" face="Calibri">. </span></span></p>
<p></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">The HTTP POST request body representing a </span><span style="font-family: courier new,courier;">SearchRequest</span><span style="font-family: Calibri;" face="Calibri"> can be formatted in JSON as follows: </span></span></p>
<p></p>
<div style="border: 1px solid #CDD4C9;"><span style="font-family: Times New Roman; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier; font-size: small;" size="3">{</span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier; font-size: small;" size="3">&nbsp;'request': { </span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier; font-size: small;" size="3">&nbsp;&nbsp;&nbsp;&nbsp; 'Querytext': 'sharepoint', </span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier; font-size: small;" size="3">&nbsp;&nbsp;&nbsp;&nbsp; 'StartRow':1,</span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier; font-size: small;" size="3">&nbsp;&nbsp;&nbsp;&nbsp; 'RowLimit':8,</span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier; font-size: small;" size="3">&nbsp;&nbsp;&nbsp;&nbsp; 'SelectProperties': {</span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier; font-size: small;" size="3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'results': ['Title','ContentSource','DisplayAuthor'] </span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier; font-size: small;" size="3">&nbsp;&nbsp;&nbsp;&nbsp; },</span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier; font-size: small;" size="3">&nbsp;&nbsp;&nbsp;&nbsp; 'TrimDuplicates':true,</span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier; font-size: small;" size="3">&nbsp;&nbsp;&nbsp;&nbsp; 'Refiners': 'companies,contentclass,ContentType(filter=7/0/*),FileExtension(filter=7/0/*),FileType(filter=6/0/*)',</span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier; font-size: small;" size="3">&nbsp;&nbsp;&nbsp;&nbsp; 'RefinementFilters': {'results': ['filetype:equals("pptx")'] }</span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier; font-size: small;" size="3">&nbsp; }</span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier; font-size: small;" size="3">}</span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span></div>
<p></p>
<p><span style="color: #800000; font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">One important thing to note here, is that when formatting the request as JSON, it is important to note that the Accept and ContentType headers must be set to &ldquo;<span style="font-family: courier new,courier;">application/json;odata=verbose</span>&rdquo;. It is NOT enough with only &ldquo;<span style="font-family: courier new,courier;">application/json</span>&rdquo;.</span></span></p>
<p></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">And here you can see a full raw HTTP POST request.</span></span></p>
<p></p>
<div style="border: 1px solid #CDD4C9;"><span style="font-family: Times New Roman; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier;">POST https://localhost/_api/search/postquery HTTP/1.1</span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier;">Accept: application/json;odata=verbose</span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier;">Content-Type: application/json;odata=verbose</span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier;">Host: localhost</span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier;">Content-Length: 419</span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span>
<p>&nbsp;</p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier;">{</span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier;">&nbsp;'request': {</span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier;">&nbsp;&nbsp;&nbsp;&nbsp; 'Querytext': 'sharepoint',</span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier;">&nbsp;&nbsp;&nbsp;&nbsp; 'StartRow':1,</span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier;">&nbsp;&nbsp;&nbsp;&nbsp; 'RowLimit':8,</span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier;">&nbsp;&nbsp;&nbsp;&nbsp; 'SelectProperties': {</span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'results': ['Title','ContentSource','DisplayAuthor']</span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier;">&nbsp;&nbsp;&nbsp;&nbsp; },</span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier;">&nbsp;&nbsp;&nbsp;&nbsp; 'TrimDuplicates':true,</span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier;">&nbsp;&nbsp;&nbsp;&nbsp; 'Refiners':'companies,contentclass,ContentType(filter=7/0/*),FileExtension(filter=7/0/*),FileType(filter=6/0/*)',</span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier;">&nbsp;&nbsp;&nbsp;&nbsp; 'RefinementFilters': {'results': ['filetype:equals("pptx")'] }</span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier;">&nbsp; }</span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span>
<p><span style="font-family: courier new,courier;">}</span></p>
<span style="font-family: courier new,courier; font-size: small;" face="Times New Roman" size="3"> </span></div>
<p></p>
<p>&nbsp;</p>
<p></p>]]></content:encoded>
    </item>
    <item>
      <title>Applying Hit-Highlighting to any property in the Search Results WebPart in SharePoint 2013</title>
      <link>https://docs.microsoft.com/archive/blogs/nadeemis/applying-hit-highlighting-to-any-property-in-the-search-results-webpart-in-sharepoint-2013</link>
      <pubDate>Tue, 16 Oct 2012 13:09:00 GMT</pubDate>
      <dc:creator><![CDATA[Nadeem Ishqair - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/nadeemis/2012/10/16/applying-hit-highlighting-to-any-property-in-the-search-results-webpart-in-sharepoint-2013/</guid>
      <description><![CDATA[Applies to: SharePoint 2013
&nbsp;
In the beginning I thought this wasn&rsquo;t possible without...]]></description>
      <content:encoded><![CDATA[<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">Applies to: SharePoint 2013</span></span></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">&nbsp;</span></span></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">In the beginning I thought this wasn&rsquo;t possible without adding custom JavaScript code to the Display Template. </span></span></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">However, after some digging, this task seems to be a relatively simple one that can be solved by some minor configuration changes.</span></span></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">Follow the steps below to enable hit-highlighting of the value of any property that is returned by search results:</span></span></p>
<p style="padding-left: 30px;"><br /><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">1. Edit the Search Results WebPart.</span></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">2. Under Display Templates, select &ldquo;Use a single template to display items&rdquo;. This is not what we want&hellip; but hold on.</span></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">3. The Hit-Highlighted properties (JSON) textbox is now editable, add the MP you want hit highlighting for in there as shown in the screenshot below.</span></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">Note: the Managed Property you add in there has to be configured as "retrievable" in your Search Schema, and added to the list of properties to be retrieved in your Display Template.</span></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/39/86/8015.HitHighlighting_capture_1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-86/8015.HitHighlighting_5F00_capture_5F00_1.png"><img alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/39/86/8015.HitHighlighting_capture_1.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-86/8015.HitHighlighting_5F00_capture_5F00_1.png" border="0" /></a></span></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri"></span></span>&nbsp;<span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">4. Click on Apply &ndash; this will save the WebPart configuration.</span></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">5. Now back to the Display Templates section, select &ldquo;Use result types to display items&rdquo; to make the Search Results WebPart use the Result Type configuration to select which Display Template to apply for each result item.</span></span></p>
<p style="padding-left: 30px;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/39/86/7713.HitHighlighting_capture_2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-86/7713.HitHighlighting_5F00_capture_5F00_2.png"><img alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/39/86/7713.HitHighlighting_capture_2.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-86/7713.HitHighlighting_5F00_capture_5F00_2.png" border="0" /></a></p>
<p>&nbsp;</p>
<p style="padding-left: 30px;"><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">6. Click on Apply or OK.</span></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">7. Save the Page to stop editing.</span></span></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">&nbsp;</span></span></p>
<p><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">&nbsp;</span></span><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">Now, we'll need to customize our Display Template&nbsp;to extract the hit-highlighted value and display that value to the user.</span></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">1. </span></span><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">Edit the Display Template; I am going to use the <i>Item_PowerPoint.html</i> template as an example. This file is located at: "<span style="color: #003366;"><i>https://site/_catalogs/masterpage/Display%20Templates/Search/Item_PowerPoint.html</i></span>"</span></span></p>
<p style="padding-left: 30px;"><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">2. Use the section below of JavaScript code to get the hit-highlighted value of the required Managed Property. Here in my example, I have configured the "Parent Link" Managed Property to be hit-highlighted.</span></span></p>
<div style="border: 1px solid #CDD4C9; margin-left: 60px;">
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;" size="3">...</span></p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;" size="3">/* start: getting value of hit-highlighted property */</span></p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;" size="3">/* use this snippet to extract the value of a hithighlighted property */</span></p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;" size="3">/* get the current item id */</span></p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;" size="3">var csr_id = ctx.CurrentItem.csr_id;</span></p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;" size="3">/* get the hit-highlighted value */</span></p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;" size="3">var parentLinkHitHighlighted = Srch.U.getHighlightedProperty(csr_id, ctx.CurrentItem, "ParentLink");</span></p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;" size="3">/* get the original value in case nothing was returned in the previous */</span></p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;" size="3">var parentLinkUrl = ctx.CurrentItem.ParentLink;</span></p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;" size="3">if ($isEmptyString(parentLinkHitHighlighted)) {parentLinkHitHighlighted = $htmlEncode(ctx.CurrentItem.ParentLink);}</span></p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;" size="3">/* end: getting value of hit-highlighted property */</span></p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;" size="3">...</span></p>
</div>
<p style="padding-left: 30px;"><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri"></span></span>&nbsp;</p>
<p style="padding-left: 30px;"><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">3. </span></span><span style="font-size: small;" size="3"><span style="font-family: Calibri;" face="Calibri">Finally, we add some HTML markup to render the "Parent Link" hit-highlighted value.</span></span></p>
<div style="border: 1px solid #CDD4C9; margin-left: 60px;">
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;" size="3">&lt;!-- custom HTML markup to render the parent link --&gt;</span></p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;" size="3">&lt;div&gt;</span></p>
<p style="padding-left: 60px;"><span style="font-family: courier new,courier;" size="3">&lt;span&gt;In Library: &lt;/span&gt;&lt;a href="_#=parentLinkUrl=#_"&gt;_#=parentLinkHitHighlighted=#_&lt;/a&gt;</span></p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;" size="3">&lt;/div&gt;</span></p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;" size="3">&lt;!-- end custom markup --&gt;</span></p>
</div>
<p style="padding-left: 30px;">&nbsp;</p>
<p style="padding-left: 30px;"><span size="3"><span face="Calibri">The final result can be seen here. I search for "sharepoint document" and you can see how my Parent Link property gets highlighted accordingly.</span></span></p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;" size="3"><span face="Calibri"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/39/86/3463.HitHighlighting_capture_3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-86/3463.HitHighlighting_5F00_capture_5F00_3.png"><img alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/39/86/3463.HitHighlighting_capture_3.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-86/3463.HitHighlighting_5F00_capture_5F00_3.png" border="0" /></a>&nbsp;</span></span></p>
<p style="padding-left: 30px;"><span size="3"><span face="Calibri"></span></span>&nbsp;</p>
<p style="padding-left: 30px;"><span size="3"><span face="Calibri">And&nbsp;below you&nbsp;can download&nbsp;the full version of the <i>Item_PowerPoint.html</i> Display Template&nbsp;used which includes the code snippets mentioned in this post.</span></span></p>
<p></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/36/01/26/Item_PowerPoint_custom.html" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-36-01-26/Item_5F00_PowerPoint_5F00_custom.html">Item_PowerPoint_custom.html</a></p>]]></content:encoded>
    </item>
    <item>
      <title>About the ClientType parameter in the SharePoint 2013 Search REST API</title>
      <link>https://docs.microsoft.com/archive/blogs/nadeemis/about-the-clienttype-parameter-in-the-sharepoint-2013-search-rest-api</link>
      <pubDate>Mon, 27 Aug 2012 08:23:00 GMT</pubDate>
      <dc:creator><![CDATA[Nadeem Ishqair - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/nadeemis/2012/08/27/about-the-clienttype-parameter-in-the-sharepoint-2013-search-rest-api/</guid>
      <description><![CDATA[The client type parameters is used to tag a query with a value defining the source application that...]]></description>
      <content:encoded><![CDATA[<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">The client type parameters is used to tag a query with a value defining the source application that initiated the search query. This tag is then used by query logging and reporting to differentiate the sources&nbsp;of search requests.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Here is an example of query using the Search REST service in SharePoint 2013 with the client type parameter set to "custom":</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;"><span style="text-decoration: underline; color: #5499b9;">https://host/site/_api/search/query?querytext='sharepoint&nbsp;is cool'&amp;clienttype='custom'</span></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">The <a href="https://msdn.microsoft.com/en-us/library/microsoft.office.server.search.query.querylogclienttype(office.15).aspx">Microsoft.Office.Server.Search.Query.QueryLogClientType</a> enumeration defines the valid values for the client type parameter.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">If you specify a value that is not valid, your value will be replaced by "Unknown". You should use "Custom" in your custom search application.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;"><strong><span style="text-decoration: underline;">So what is the Query Log Client Type parameter useful for?</span></strong></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">When viewing Query Health Reports within the Search Service Application; you can filter reports shown according to the available values for client types. This is useful&nbsp;when following trends of usage and load from different search consumers.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/39/86/0412.query_reports_snippet.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-86/0412.query_5F00_reports_5F00_snippet.png"><img alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/39/86/0412.query_reports_snippet.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-86/0412.query_5F00_reports_5F00_snippet.png" border="0" /></a></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;"><strong><span style="text-decoration: underline;">How are the values of the Query Log Client Type parameter processed?</span></strong></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">The Analytics service is responsible for processing the logged client type values. This happens in the timer job "<em>Analytics Timer Job for Search Service Application Search Service Application</em>". This timer job runs every 10 minutes and collects analytics information for the Search Service Application.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>SharePoint 2013 Search REST API</title>
      <link>https://docs.microsoft.com/archive/blogs/nadeemis/sharepoint-2013-search-rest-api</link>
      <pubDate>Fri, 24 Aug 2012 03:37:00 GMT</pubDate>
      <dc:creator><![CDATA[Nadeem Ishqair - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/nadeemis/2012/08/24/sharepoint-2013-search-rest-api/</guid>
      <description><![CDATA[In this post I'll go through the details of the SharePoint 2013 Search REST API. This new REST...]]></description>
      <content:encoded><![CDATA[<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">In this post I'll go through the details of the SharePoint 2013 Search REST API. This new REST service is the best way to go in a variety of application scenarious. SharePoint Apps built in JavaScript is one good example. External Applications to SharePoint that require search functionality; can also leverage this service as the endpoint for communication into the Search platform.</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-size: 11pt;"><span style="font-family: Calibri;">The</span><span style="font-family: 'Cambria Math';"> </span><span style="font-family: Calibri;">old</span><span style="font-family: 'Cambria Math';"> </span><span style="font-family: Calibri;">search</span><span style="font-family: 'Cambria Math';">.</span><span style="font-family: Calibri;">asmx</span><span style="font-family: 'Cambria Math';"> </span><span style="font-family: Calibri;">SOAP</span><span style="font-family: 'Cambria Math';"> </span><span style="font-family: Calibri;">web</span><span style="font-family: 'Cambria Math';"> </span><span style="font-family: Calibri;">service</span><span style="font-family: 'Cambria Math';"> </span><span style="font-family: Calibri;">is</span><span style="font-family: 'Cambria Math';"> </span><span style="font-family: Calibri;">marked</span><span style="font-family: 'Cambria Math';"> </span><span style="font-family: Calibri;">as</span><span style="font-family: 'Cambria Math';"> </span><span style="font-family: Calibri;">deprecated in SP2013</span><span style="font-family: 'Cambria Math';">, </span><span style="font-family: Calibri;">and </span><span style="font-family: Calibri;">the</span><span style="font-family: 'Cambria Math';"> </span><span style="font-family: Calibri;">new</span><span style="font-family: 'Cambria Math';"> Search </span><span style="font-family: Calibri;">REST</span><span style="font-family: 'Cambria Math';"> </span><span style="font-family: Calibri;">service </span><span style="font-family: Calibri;">is</span><span style="font-family: 'Cambria Math';"> </span><span style="font-family: Calibri;">the</span><span style="font-family: 'Cambria Math';"> </span><span style="font-family: Calibri;">replacement</span><span style="font-family: 'Cambria Math';">.</span></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;"><strong><span style="text-decoration: underline;">Location of the Search Rest service</span></strong></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">The Search REST service is located at the following URI: <a href="https://host/site/_api/search">https://host/site/_api/search</a></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;"><strong><span style="text-decoration: underline;">The Search REST API</span></strong></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">The Search REST service exposed by the URI specified above provides the following methods or entry points:</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">&nbsp;</p>
<div style="direction: ltr;">
<table style="border: 1pt solid #a3a3a3; margin-left: 0.333in; border-collapse: collapse; direction: ltr;" border="1" cellspacing="0" cellpadding="0" valign="top">
<tbody>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; width: 0.837in; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;"><span style="font-weight: bold;">query</span></p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; width: 2.709in; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;"><a href="https://host/site/_api/search/query">https://host/site/_api/search/query</a></p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; width: 8.953in; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Supports HTTP Get&nbsp;and is used to retrieve search results.</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; width: 0.837in; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;"><span style="font-weight: bold;">postquery</span></p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; width: 2.709in; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;"><a href="https://host/site/_api/search/postquery">https://host/site/_api/search/postquery</a></p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; width: 8.953in; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Supports HTTP POST and is used to retrieve search results. This method can be used to overcome URI length restrictions when using the HTTP GET based method "<span style="font-weight: bold;">query</span>".</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; width: 0.837in; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;"><span style="font-weight: bold;">suggest</span></p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; width: 2.709in; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;"><a href="https://host/site/_api/search/suggest">https://host/site/_api/search/suggest</a></p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; width: 8.953in; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">Supports HTTP GET and is used to retrieve query suggestions.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p style="margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;"><strong><span style="text-decoration: underline;">Query Parameters</span></strong></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">The following table lists the query parameters available for the <span style="font-weight: bold;">query </span>entry point:</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">&nbsp;</p>
<div>
<table style="border: 1pt solid #a3a3a3; margin-left: 0.133in; border-collapse: collapse; direction: ltr;" border="1" cellspacing="0" cellpadding="0" valign="top">
<tbody>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; width: 0.837in; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;"><span style="font-weight: bold;">Name</span></p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; width: 0.837in; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;"><span style="font-weight: bold;">Description</span></p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; width: 0.837in; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;"><span style="font-weight: bold;">Type</span></p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; width: 0.837in; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;"><span style="font-weight: bold;">Default</span></p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">querytext</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">The text of the&nbsp;search query.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">String - Maximum query text length allowed by the Keyword Query OM is 4096 characters.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 8pt;">Empty</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4"><span style="color: #5499b9; text-decoration: underline;">https://host/site/_api/search/query?querytext='search is cool'</span></td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">querytemplate</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">The query template text.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">String</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 8pt;">Empty</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4">&nbsp;</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">enableinterleaving</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Specifies if the result sets which are generated by executing query rule actions to add result&nbsp; block should be mixed with the result set for the original query.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">bool</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 8pt;">True</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4"><span style="color: #5499b9; text-decoration: underline;">https://host/site/_api/search/query?querytext='terms'&amp;enableinterleaving=false</span></td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">sourceid</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Specifies the&nbsp;unique identifier of the Result Source to use for executing the search query.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">String</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 8pt;">Empty</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4"><span style="color: #5499b9; text-decoration: underline;">https://host/site/_api/search/query?querytext='term'&amp;sourceid='8413cd39-2156-4e00-b54d-11efd9abdb89'</span></td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">rankingmodelid</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">The GUID of the Rank Model to be used for this search query.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">String</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 8pt;">Empty</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4">&nbsp;</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">startrow</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">A zero-based index of the first search result to be returned.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Integer [ &gt;= 0]</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 8pt;">0</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4"><span style="color: #5499b9; text-decoration: underline;">https://host/site/_api/search/query?querytext='terms'&amp;startrow=11</span></td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">rowlimit</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">The maximum number of search results to be returned, starting at the index specified in&nbsp; startrow.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Integer&nbsp;[ &gt;= 0]</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 8pt;">10</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4"><span style="color: #5499b9; text-decoration: underline;">https://host/site/_api/search/query?querytext='terms'&amp;startrow=11&amp;rowlimit=3</span></td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">rowsperpage</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">The number of&nbsp;results to return per page.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Integer&nbsp;[ &gt;= 0]</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 8pt;">0</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4">&nbsp;</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">selectproperties</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Specifies the list of managed properties to return for each search result item. For a managed property to be returned; the Retrievable flag must be set to "true" in the Search Schema.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">String</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 8pt;">Empty</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4"><span style="color: #5499b9; text-decoration: underline;">https://host/site/_api/search/query?querytext='terms'&amp;selectproperties='Path,Url,Title,Author'</span></td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">culture</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Specifies the identifier of the language culture of the search query. If present, the value must be a valid LCID of a culture name. A list of LCIDs is available <a href="https://msdn.microsoft.com/en-us/goglobal/bb964664.aspx">here</a>.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Integer</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 8pt;">-1</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4"><span style="color: #5499b9; text-decoration: underline;">https://host/site/_api/search/query?querytext='terms'&amp;culture=1044</span></td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">refiners</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Specifies a list of refiners to return as a comma-separated list of strings.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">String</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 8pt;">Empty</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4"><span style="color: #5499b9; text-decoration: underline;">https://host/site/_api/search/query?querytext='terms'&amp;refiners='companies,contentclass,ContentType,FileExtension,FileType'</span></td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">refinementfilters</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">The list of refinement tokens for drilldown into search results. Refinement tokens are returned as part of the RefinementResults table for the search query.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">String</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Empty</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4"><span style="color: #5499b9; text-decoration: underline;">https://host/site/_api/search/query?querytext='sharepoint'&amp;refiners='filetype'&amp;refinementfilters='filetype:equals("pptx")'</span></td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">hiddenconstraints</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Specifies additional query terms that will be appended to the query.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">String</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Empty</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4"><span style="color: #5499b9; text-decoration: underline;">https://host/site/_api/search/query?querytext='terms'&amp;hiddenconstraints='powerpoint'</span></td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">sortlist</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Specifies the list of properties to sort the search results by.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">String</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Empty</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4"><span style="color: #5499b9; text-decoration: underline;">https://host/site/_api/search/query?querytext='terms'&amp;sortlist='rank:ascending'</span></td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">enablestemming</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Specifies whether stemming is enabled for the query.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">bool</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">True</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4"><span style="color: #5499b9; text-decoration: underline;">https://host/site/_api/search/query?querytext='terms'&amp;enablestemming=false</span></td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">trimduplicates</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Specifies whether duplicate items should be removed from search results. This property can also<br />&nbsp;be used to collapse hits in the result set.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">bool</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">True</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4"><span style="color: #5499b9; text-decoration: underline;">https://host/site/_api/search/query?querytext='terms'&amp;trimduplicates=false</span></td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">trimduplicatesincludeid</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Specifies the value associated with a collapse group, typically used when a user clicks the duplicates link of an item with duplicates.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">long</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">0L</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4"><span style="color: #5499b9; text-decoration: underline;">https://host/site/_api/search/query?querytext='terms'&amp;trimduplicates=true&amp;trimduplicatesincludeid=47</span></td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">timeout</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Specifies the amount of time, in milliseconds, before the query request times out.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Integer</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">30000</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4"><span style="color: #5499b9; text-decoration: underline;">https://host/site/_api/search/query?querytext='terms'&amp;timeout=50000</span></td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">enablenicknames</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Specifies whether the exact terms in the search query are used to find matches, or if nicknames<br />&nbsp;are used as well.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">bool</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">False</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4"><span style="color: #5499b9; text-decoration: underline;">https://host/site/_api/search/query?querytext='terms'&amp;enablenicknames=true</span></td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">enablephonetic</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Specifies whether the phonetic forms of the query terms are used to find matches.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">bool</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">False</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4"><span style="color: #5499b9; text-decoration: underline;">https://host/site/_api/search/query?querytext='terms'&amp;enablephonetic=true</span></td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">enablefql</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Specifies whether the query string is according to the FAST Query Language (FQL) syntax.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Bool</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">False</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4"><span style="color: #5499b9; text-decoration: underline;">https://host/site/_api/search/query?querytext='terms'&amp;enablefql=true</span></td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">hithighlightedproperties</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Specifies the list of properties to include in the HitHighlightedProperties for each result item.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">String</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Empty</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4"><span style="color: #5499b9; text-decoration: underline;">https://host/site/_api/search/query?querytext='terms'&amp;hithighlightedproperties='Title,Author'</span></td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">bypassresulttypes</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Specifies if the search result item type should be returned for the query results.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">bool</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">False</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4">&nbsp;</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">processbestbets</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Specifies if the search promoted results should be returned, if available, as a result set.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">bool</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">True</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4">&nbsp;</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">clienttype</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Name of a client which issued query.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">String</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Empty</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4">&nbsp;</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">personalizationdata</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Gets or sets the unique identifier (GUID) for the current user who submitted the search query.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">String</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Empty</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4">&nbsp;</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">resultsurl</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Specifies the URL for the page where the search results are going to be displayed.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">String</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Empty</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4">&nbsp;</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">querytag</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Any custom tags to be used to identify the query. Multiple tags are separated by semicolons.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">String</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Empty</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4">&nbsp;</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">enablequeryrules</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Specifies if Query Rules are turned on for this query.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">bool</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">True</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4"><span style="color: #5499b9; text-decoration: underline;">https://host/site/_api/search/query?querytext='terms'&amp;enablequeryrules=false</span></td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">enablesorting</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Indicates whether results should be sorted.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">bool</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">True</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4"><span style="color: #5499b9; text-decoration: underline;">https://host/site/_api/search/query?querytext='terms'&amp;enablesorting=false</span></td>
</tr>
</tbody>
</table>
</div>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;"><strong><span style="text-decoration: underline;">Suggest Parameters</span></strong></p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">The following table lists the query parameters available from the suggest entry point:</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">&nbsp;&nbsp;</p>
<div style="direction: ltr;">
<table style="border: 1pt solid #a3a3a3; margin-left: 0.133in; border-collapse: collapse; direction: ltr;" border="1" cellspacing="0" cellpadding="0" valign="top">
<tbody>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; width: 0.837in; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;"><span style="font-weight: bold;">Name</span></p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;"><span style="font-weight: bold;">Description</span></p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; width: 0.837in; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;"><span style="font-weight: bold;">Type</span></p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; width: 0.837in; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;"><span style="font-weight: bold;">Default</span></p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">querytext</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">The text of the search query.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">String</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Empty</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4"><span style="color: #5499b9; text-decoration: underline;">https://host/site/_api/search/suggest?querytext='nad'</span></td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">inumberofquerysuggestions</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">The number of query suggestions to retrieve.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Integer&nbsp;[ &gt; 0]</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">5</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4"><span style="color: #5499b9; text-decoration: underline;">https://host/site/_api/search/suggest?querytext='nad'&amp;inumberofquerysuggestions=6</span></td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">inumberofresultsuggestions</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">The number of personal results to retrieve.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Integer&nbsp;[ &gt; 0]</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">5</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4"><span style="color: #5499b9; text-decoration: underline;">https://host/site/_api/search/suggest?querytext='nad'&amp;inumberofresultsuggestions=6</span></td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">fprequerysuggestions</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Specifies whether to retrieve pre-query suggestions or post-query suggestions.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">bool</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">False</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4"><span style="color: #5499b9; text-decoration: underline;">https://host/site/_api/search/suggest?querytext='nad'&amp;fprequerysuggestions=true</span></td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">fhithighlighting</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Specifies whether the query suggestions should be highlighted. If "true", the terms<br />&nbsp;in the returned query suggestions that match terms in the specified query are&nbsp; surrounded with &lt;B&gt; and &lt;/B&gt; HTML tags.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">bool</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">True</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4"><span style="color: #5499b9; text-decoration: underline;">https://host/site/_api/search/suggest?querytext='nad'&amp;fhithighlighting=true</span></td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">fcapitalizefirstletters</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Specifies whether to capitalize first letters in each term in query suggestions.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">bool</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">False</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4"><span style="color: #5499b9; text-decoration: underline;">https://host/site/_api/search/suggest?querytext='nad'&amp;fcapitalizefirstletters=true</span></td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">showpeoplenamesuggestions</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Specifies if people names should be included in query suggestions.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">bool</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">False</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4"><span style="color: #5499b9; text-decoration: underline;">https://host/site/_api/search/suggest?querytext='nad'&amp;showpeoplenamesuggestions=true</span></td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">culture</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Specifies the identifier of the language culture of the search query. If present, the value must be a valid LCID of a culture name. A nice list of LCIDs is available <a href="https://msdn.microsoft.com/en-us/goglobal/bb964664.aspx">here</a>.</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">Integer</p>
</td>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top;">
<p style="margin: 0in; font-family: Calibri; font-size: 9pt;">-1</p>
</td>
</tr>
<tr>
<td style="padding: 4pt; border: 1pt solid #a3a3a3; vertical-align: top; padding-bottom: 8pt;" colspan="4"><span style="color: #5499b9; text-decoration: underline;">https://host/site/_api/search/suggest?querytext='nad'&amp;culture=1044</span></td>
</tr>
</tbody>
</table>
</div>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">&nbsp;</p>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">&nbsp;References:</p>
<ul>
<li>
<div style="margin: 0in; font-family: Calibri; font-size: 11pt;"><a href="https://msdn.microsoft.com/en-us/library/hh659202(office.12).aspx">[MS-SRCHCSOM]: Search Client Query Protocol Specification</a></div>
</li>
<li>
<div style="margin: 0in; font-family: Calibri; font-size: 11pt;"><a href="https://msdn.microsoft.com/en-us/library/jj163300(office.15).aspx">Search in SharePoint 2013 on MSDN</a></div>
</li>
<li>
<div style="margin: 0in; font-family: Calibri; font-size: 11pt;">Microsoft.Office.Server.Search.DLL - Reflector is your best friend :).</div>
</li>
</ul>
<p style="margin: 0in; font-family: Calibri; font-size: 11pt;">&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>SharePoint 2013 Preview has just landed</title>
      <link>https://docs.microsoft.com/archive/blogs/nadeemis/sharepoint-2013-preview-has-just-landed</link>
      <pubDate>Tue, 17 Jul 2012 02:50:00 GMT</pubDate>
      <dc:creator><![CDATA[Nadeem Ishqair - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/nadeemis/2012/07/17/sharepoint-2013-preview-has-just-landed/</guid>
      <description><![CDATA[Micorosft SharePoint 2013 Preview was released yesterday evening. So many new cool features.
Search...]]></description>
      <content:encoded><![CDATA[<p>Micorosft SharePoint 2013 Preview was <a title="Microsoft unveils the new Office" href="https://www.microsoft.com/en-us/news/Press/2012/Jul12/07-16OfficePR.aspx">released</a> yesterday evening. So many <a title="New features in SharePoint 2013" href="https://technet.microsoft.com/en-us/sharepoint/fp142374">new cool features</a>.</p>
<p><a title="All new Search Platform" href="https://msdn.microsoft.com/en-us/library/sharepoint/jj163091(v=office.15)#bmSearch">Search</a> is all around the place now, YEAH!</p>
<p>&nbsp;</p>
<p>Links for downloading the bits, documentation and training.</p>
<p>Download Microsoft SharePoint Server 2013 Preview from <a title="SharePoint Server 2013 Preview Download" href="https://technet.microsoft.com/en-us/evalcenter/hh973397" target="_blank">here</a>.</p>
<p><a href="https://technet.microsoft.com/en-us/library/cc262485(office.15).aspx">SharePoint 2013 System Requirements</a>.</p>
<p><a href="https://technet.microsoft.com/en-US/sharepoint/fp123606">SharePoint 2013 Training Videos for IT Pros</a>.</p>
<p><a href="https://msdn.microsoft.com/en-us/sharepoint/default.aspx">SharePoint 2013 Dev Center</a>.</p>
<p><a href="https://technet.microsoft.com/en-us/library/cc303422(office.15).aspx">SharePoint 2013 Preview on Technet</a>.</p>
<p><a href="https://msdn.microsoft.com/en-us/library/jj162979(office.15).aspx">Sharepoint 2013 Preview on MSDN</a>.</p>
<p><a href="https://msdn.microsoft.com/en-us/office/apps/fp160950">Build apps for Office and SharePoint</a>.</p>
<p><a href="https://msdn.microsoft.com/en-us/office/apps/fp123626">SharePoint 2013 Preview Developer Training Videos</a>.</p>
<p><a href="https://sharepoint.microsoft.com/en-us/preview/default.aspx">SharePoint 2013 Preview Marketing Site</a></p>
<p>&nbsp;</p>
<p>I'll keep updating this post with more links to training material continuously. Stay tuned!</p>]]></content:encoded>
    </item>
    <item>
      <title>Implementing a SharePoint XML Indexing Connector</title>
      <link>https://docs.microsoft.com/archive/blogs/nadeemis/implementing-a-sharepoint-xml-indexing-connector</link>
      <pubDate>Mon, 04 Jun 2012 12:30:00 GMT</pubDate>
      <dc:creator><![CDATA[Nadeem Ishqair - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/nadeemis/2012/06/04/implementing-a-sharepoint-xml-indexing-connector/</guid>
      <description><![CDATA[Most organizations have several systems holding their data. Data from&nbsp;these systems must be...]]></description>
      <content:encoded><![CDATA[<p>Most organizations have several systems holding their data. Data from&nbsp;these systems must be indexable and made available for search on the common Internal Search portal. While most of the different data silos are able to dump or export their full dataset as XML, SharePoint&nbsp;does not&nbsp;include an OOTB&nbsp;general purpose XML indexing connector.</p>
<p>The <a title="SharePoint Server Search Connector Framework" href="https://msdn.microsoft.com/en-us/library/ee556429.aspx">SharePoint Server Search Connector Framework</a> is known to be overly complex, and documentation out there about this subject is very limited. There are basically two types of custom search connectors for SharePoint 2010 that can be implemented; the .Net Assembly Connector and the Custom Connector. More details about the differences&nbsp;between&nbsp;them can be found <a title="here" href="https://msdn.microsoft.com/en-us/library/ee554911.aspx">here</a>.&nbsp;Mainly, a&nbsp;Custom Connector is agnostic of external content types, whereas each .NET Assembly Connector is specific to&nbsp;one external content type, and whenever the external content type changes, the .Net Assembly Connector must be re-compiled and re-deployed. If the entity model of the external system is dynamic and is large scale a Custom Connector should be considered over the .Net Assembly Connector. Also, a Custom Connector provides administration user interface integration, but a .NET Assembly Connector does not.</p>
<p>&nbsp;</p>
<h1>The XML File Indexing Connector</h1>
<p>The XML File Indexing Connector that is presented here is a custom search indexing connector that can be used to crawl and index XML files. In this series of posts I am going to first show you how to install, setup and configure the connector. In future posts I will go into more implementation details where we&rsquo;ll look into code to see how the connector is implemented and how you can customize it to suit specific needs.</p>
<p><span>This post is divided into the following sections:</span></p>
<ul>
<li>Installing and deploying the connector</li>
<li>Creating a new Content Source using the connector</li>
<li>Using the Start Address of the Content Source to configure the connector</li>
<li>Automatic and dynamic generation of Crawled Properties from XML elements</li>
<li>Full Crawl vs. Incremental Crawl</li>
<li>Optimizations and considerations when crawling large XML files</li>
<li>Future plans</li>
</ul>
<p>&nbsp;</p>
<h2>Installing and deploying the connector</h2>
<p>The package that can be downloaded at the bottom of this post, includes the following components:</p>
<ol>
<li>model.xml: This is the BCS model file for the connector</li>
<li>XmlFileConnector.dll: This is the DLL file of the connector</li>
<li>The Folder XmlFileConnector: This includes the Visual Studio Solution of the connector&nbsp;&nbsp;</li>
</ol>
<p>Follow these steps to install the connector:</p>
<p>&nbsp;1. Install the XmlFileConnector.dll in the Global Assembly Cache on the SharePoint application server(s)</p>
<p style="padding-left: 30px;"><span style="color: #003366; font-family: courier new,courier;">gacutil -i "XmlFileConnector.dll"</span></p>
<p>&nbsp;2. Open the SharePoint 2010 Management Shell on the application server.</p>
<p>3. At the command prompt, type the following command to get a reference to your FAST Content SSA.</p>
<p style="padding-left: 30px;"><span style="color: #003366; font-family: courier new,courier;">$fastContentSSA = Get-SPEnterpriseSearchServiceApplication -Identity "FASTContent SSA"</span></p>
<p>&nbsp;4. Add the following registry key to the application server</p>
<p style="padding-left: 30px;"><span style="color: #003366; font-family: courier new,courier;">[HKEY_LOCAL_MACHINE]\SOFTWARE\Microsoft\OfficeServer\14.0\Search\Setup\ProtocolHandlers\xmldoc</span></p>
<p style="padding-left: 30px;"><span style="font-family: arial,helvetica,sans-serif;">Set the value of the registry key to &ldquo;<span style="color: #333399; font-family: courier new,courier;">OSearch14.ConnectorProtocolHandler.1</span>&rdquo;</span></p>
<p>&nbsp;5. Add the new Search Crawl Custom Connector</p>
<p style="padding-left: 30px;"><span style="color: #003366; font-family: courier new,courier;"><span style="color: #003366; font-family: courier new,courier;">New-SPEnterpriseSearchCrawlCustomConnector -SearchApplication $fastContentSSA &ndash;Protocol xmldoc -Name xmldoc -ModelFilePath "XmlFileConnector\Model.xml"</span></span>&nbsp;</p>
<p>7. Restart the SharePoint Server Search 14 service. At the command prompt run:</p>
<p style="padding-left: 30px;"><span style="color: #003366; font-family: courier new,courier;">net stop osearch14</span></p>
<p style="padding-left: 30px;"><span style="color: #003366; font-family: courier new,courier;">net start osearch14</span></p>
<p><span style="color: #003366; font-family: courier new,courier;"></span>&nbsp;8.&nbsp; Create a new Crawled Property Category for the XML File Connector. Open the FAST Search Server 2010 for SharePoint Management Shell and run the following command:</p>
<p style="padding-left: 30px;"><span style="color: #003366; font-family: courier new,courier;">New-FASTSearchMetadataCategory -Name "Custom XML Connector" -Propset "BCC9619B-BFBD-4BD6-8E51-466F9241A27A"</span></p>
<p style="padding-left: 30px;"><b><span style="text-decoration: underline;"></span></b>&nbsp;<span style="color: #ff0000;"><b><span style="text-decoration: underline;">Note</span></b> that the Propset GUID must be the one specified above, since this GUID is hardcoded in the Connector code as the Crawled Properties Category which will receive discovered Crawled Properties.</span></p>
<p style="padding-left: 30px;">&nbsp;</p>
<h2>Creating a new Content Source using the XML File Connector</h2>
<p>1. Using the Central Administration UI, on the Search Administration Page&nbsp;of the FAST Content SSA, click <b>Content Sources</b>, then <b>New Content Source.</b></p>
<p>2. Type a name for the content source, and in <b>Content Source Type</b>, select <b>Custom Repository.</b></p>
<p>3. In <b>Type of Repository</b> select <b>xmldoc.</b></p>
<p>4. In <b>Start Addresses</b>, type the URLs for the folders that contain the XML files you want to index. The URL should be inserted in the following format:</p>
<p style="padding-left: 30px;"><span style="color: #003300; font-family: courier new,courier; font-size: small;">xmldoc://hostname/folder_path/#x=:doc:id;;urielm=url;;titleelm=title#</span></p>
<p>The following section describes the different parts of the Start Address.</p>
<p>&nbsp;</p>
<h2>Using the Start Address of the Content Source to configure the connector</h2>
<p>The Start Address specified for the Content Source must be of the following format. The XML File Connector will read this Start Address and use them when crawling the XML content.</p>
<p><span style="color: #003300; font-family: courier new,courier; font-size: small;">xmldoc://hostname/folder_path/#x=:doc:id;;urielm=url;;titleelm=title#</span></p>
<h3>xmldoc</h3>
<p><span style="font-family: courier new,courier;">xmldoc</span> is the protocol corresponding to the registry key we added when installing the connector.</p>
<h3>//hostname/folder_path/</h3>
<p><span style="font-family: courier new,courier;">//hostname/folder_path/</span> is the full path to the folder conaining the XML files to crawl.</p>
<p>Exmaple: <span style="font-family: courier new,courier;">//demo2010a/c$/enwiki</span></p>
<h3>#x=doc:id;;urielm=url;;titleelm=title#</h3>
<p><span style="font-family: courier new,courier;">#x=doc:id;;urielm=url;;titleelm=title#</span> is the special part of the Start Address that is used&nbsp;as configuration values by the connector:</p>
<h4>x=:doc:id</h4>
<p>Defines which elements in the XML file to use as document and identifier elements. <span style="text-decoration: underline;">This configuration parameter is mandatory.</span></p>
<p>For example, say a we have an XML file as follows:</p>
<div>
<p><code class="mysql">&lt;feed&gt;<br /> &lt;document&gt;<br /> &lt;id&gt;Some id&lt;/id&gt;<br /> &lt;title&gt;&lt;/title&gt;<br /> &lt;url&gt;some url&lt;/id&gt;<br /> &lt;field1&gt;Content for field1&lt;/field1&gt;<br /> &lt;field2&gt;Content for field2&lt;/field2&gt;<br /> &lt;/document&gt;<br /> &lt;document&gt;<br /> ...<br /> &lt;/document&gt;<br /> &lt;/feed&gt;<br /></code></p>
</div>
<p>Here the value for the <span style="font-family: courier new,courier;">x</span> configuration parameter would be <span style="font-family: courier new,courier;">x=:document:id</span></p>
<h4>urielm=url</h4>
<p><span style="font-family: courier new,courier;">urielm=url</span> defines which element in the XML file to use as the URL. This will end up as the URL of the document used by the FS4SP processing pipeline and will go into the &rdquo;url&rdquo; managed property. <span style="text-decoration: underline;">This configuration parameter can be left out.</span> In this case, the default URL of the document will be as follows: xmldoc://id/[id value]</p>
<h4>titleelm=title</h4>
<p><span style="font-family: courier new,courier;">titleelm=title</span> defines which element in the XML file to use as the Title. This will end up as the Title of the document, and the value of this element will go into the title managed property. <span style="text-decoration: underline;">This configuration parameter can be left out.</span> If the parameter is left out, then the title of the document will be set to &rdquo;notitle&rdquo;.&nbsp;</p>
<p>&nbsp;</p>
<h2>Automatic and dynamic generation of Crawled Properties from XML elements</h2>
<p>&nbsp;The XML File Connector uses advanced BCS techniques to automatically Discover crawled properties from the content of the XML files.</p>
<p>All elements in the XML docuemt will be created as crawled properties. This provides the ability to dynamically crawl any XML file, without the need to pre-define the properties of the entities in the BCS Model file, and re-deploy the model file for each change.</p>
<p>This is defined in the BCS Model file on the XML Document entity. The TypeDescriptor element named DocumentProperties, defines an list of dynamic property names and values. The property names in this list will automatically be discovered by the BCS framework and corresponding crawled properties will automatically be created for each property.</p>
<p>The following snippet&nbsp; from the BCS Model file shows how this is configured:</p>
<div>
<pre class="scroll"><code class="html">&lt;!-- Dynamic Properties --&gt;<br /> &lt;TypeDescriptor Name="DocumentProperties" TypeName="XmlFileConnector.DocumentProperty[], XmlFileConnector, Version=1.0.0.0, Culture=neutral, PublicKeyToken=109e5afacbc0fbe2" IsCollection="true"&gt;<br /> &lt;TypeDescriptors&gt;<br /> &lt;TypeDescriptor Name="Item" TypeName="XmlFileConnector.DocumentProperty, XmlFileConnector, Version=1.0.0.0, Culture=neutral, PublicKeyToken=109e5afacbc0fbe2"&gt;<br /> &lt;Properties&gt;<br /> &lt;Property Name="Property" Type="System.String"&gt;xxxxx&lt;/Property&gt;<br /> &lt;/Properties&gt;<br /> &lt;TypeDescriptors&gt;<br /> &lt;TypeDescriptor Name="PropertyName" TypeName="System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"&gt;<br /> &lt;Properties&gt;<br /> &lt;Property Name="PropertyName" Type="System.String"&gt;xxxx&lt;/Property&gt;<br /> &lt;/Properties&gt;<br /> &lt;/TypeDescriptor&gt;<br /> &lt;TypeDescriptor Name="PropertyValue" TypeName="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"&gt;<br /> &lt;Properties&gt;<br /> &lt;Property Name="PropertyValue" Type="System.String"&gt;xxxxxx&lt;/Property&gt;<br /> &lt;/Properties&gt;<br /> &lt;/TypeDescriptor&gt;<br /> &lt;/TypeDescriptors&gt;<br /> &lt;/TypeDescriptor&gt;<br /> &lt;/TypeDescriptors&gt;<br /> &lt;/TypeDescriptor&gt;<br /> &lt;!-- End of Dynamic Properties --&gt;</code></pre>
<p><br />In addition to the ability to discover crawled properties automatically from the XML content, the XMl File Connector also creates a default property with the name &ldquo;<strong>XMLContent</strong>&rdquo;. This property contains the raw XML of the document being processed. This enables the use of the XML content in a custom Pipeline extensibility stage for further processing.</p>
</div>
<h4><b><span style="text-decoration: underline;">Example</span></b></h4>
<p>Say that we have the following XML file to index.</p>
<div>
<pre class="scroll"><code class="html"></code>&nbsp;<code class="html">&lt;feed&gt;<br /> &lt;doc&gt;<br /> &lt;title&gt;Wikipedia: Nobel Charitable Trust&lt;/title&gt;<br /> &lt;url&gt;https://en.wikipedia.org/wiki/Nobel_Charitable_Trust&lt;/url&gt;<br /> &lt;abstract&gt;The Nobel Charitable Trust (NCT) is a charity set up by members of the Swedish Nobel family, i.e.&lt;/abstract&gt;<br /> &lt;links&gt;<br /> &lt;sublink linktype="nav"&gt;&lt;anchor&gt;Michael Nobel Energy Award&lt;/anchor&gt;&lt;link&gt;https://en.wikipedia.org/wiki/Nobel_Charitable_Trust#Michael_Nobel_Energy_Award&lt;/link&gt;&lt;/sublink&gt;<br /> &lt;sublink linktype="nav"&gt;&lt;anchor&gt;References&lt;/anchor&gt;&lt;link&gt;https://en.wikipedia.org/wiki/Nobel_Charitable_Trust#References&lt;/link&gt;&lt;/sublink&gt;<br /> &lt;/links&gt;<br /> &lt;/doc&gt;<br /> &lt;doc&gt;<br /> ...<br /> &lt;/doc&gt;<br /> &lt;/feed&gt;<br /> </code></pre>
<p class="scroll"><code class="html"></code>When running the connector the first time; we see the following Crawled Properties discovered&nbsp;in the Custom XML Connector Crawled Properties Category.</p>
</div>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/39/86/5736.blog_post_img_1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-86/5736.blog_5F00_post_5F00_img_5F00_1.png"><img alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/39/86/5736.blog_post_img_1.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-39-86/5736.blog_5F00_post_5F00_img_5F00_1.png" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h2>Full Crawl vs. Incremental Crawl</h2>
<p>The BCS Search Connector Framework is implemented in such a way that keeps track of all crawled content in the Crawl Log Database. For each search Content Source, a log of all document ids that have been crawled is stored. This log is used when running subsequent crawls of the content source, be it either a full or an incremental crawl.</p>
<p>When running an incremental crawl, the BCS framework compares the list of document ids it received from the connector against the list of ids stored in the crawl log database. If there are any document ids within the crawl log database that&nbsp;have not&nbsp;not been received from the connector, the BCS framework assumes that these documents have been deleted, and will attemp to issue deletion operations to the search system. This will cause many inconsistencies, and will make it very difficult to keep both&nbsp; the actual dataset and the BCS crawl log in sync.</p>
<p>So, when running either a Full Crawl or an Incremental Crawl of the Content Source, the full dataset of the XML files must be available for traversal. If there are any items missing in subsequent crawls, the SharePoint crawler will consider those as subject for deletion, and og ahead and delete those from the search index.</p>
<p>One possible work around to tackle this limitation and try to avoid (re)-generating the full data set each time something minor changes, would be to split the XML content into files of different known update frequences, where content that is known to have higher update rates is placed in separate input folders with separate configured Conetent Sources&nbsp;within the FAST Content SSA.</p>
<p>&nbsp;</p>
<h2>Optimizations and considerations when crawling large XML files</h2>
<p>When the XML File Connector&nbsp;starts crawling content, it will&nbsp;load and parse&nbsp;found XML files one at the time. So, for each XML file found in the input directory, the whole XML file is read into memory and cached for all subsequent operations by the crawler until all&nbsp;items found in the XML file have been submitted to the indexing subsystem. In that case, the memory cache is cleared, and the next file is loaded and parsed until all files have been processed.</p>
<p>For&nbsp;the reason just described, it is recommended not to have large single XML files, but split the content across multiple XML files, each consisting of a&nbsp;number of items the is reasonable and can be easily parsed and cached in memory.&nbsp;</p>
<p>&nbsp;</p>
<h2>Future plans</h2>
<p>&nbsp;</p>
<ul>
<li>Generalize&nbsp;the connector and build a framework around it.</li>
<li>Add document Processing capabilities to this connector and framework.</li>
<li>Upgrade&nbsp;the connector to work with the next version of SharePoint.</li>
</ul>
<p>&nbsp;</p>
<p>Feedback is welcomed!</p>
<p>Enjoy.</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/31/48/24/XmlFileConnector.zip" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-31-48-24/XmlFileConnector.zip">XmlFileConnector.zip</a></p>]]></content:encoded>
    </item>
  </channel>
</rss>