Content search problem

Hi all
I am having some problems with the content search. Please help me with this:
In iFS, a new document type "MWORLDTYPE" (sub type of DOCUMENT class) is created. I am using SimpleXmlParser to load xml files and convert them into mworldType documents. After parsing all loaded xml documents are seen as mworldType documents. My task is to do Attribute+content search.
I used the below code to do content search. Though one of my xml (mworldType) documents contain the text for which I am searching, I am getting zero results.
Used the below statement to run the file:
java ExtendedContentSearchXml name
Attached please see the following documents: 1. source code, 2. sample xml instance.
source code
// $Header$
// Copyright (c) 2000 Oracle Corporation
public class ExtendedContentSearchXml extends BaseTestHarness
private String phrase ;
* Constructor
* Please complete the missing tags for ContentSearch
* @param
* @return
* @throws
* @pre
* @post
public ExtendedContentSearchXml()
* Please complete the missing tags for doSomething
* @param
* @return
* @throws
* @pre
* @post
public void doSomething( LibrarySession ifs )
throws IfsException
ifs.setAdministrationMode(true);
//SearchSpecification searchSpecification = buildSearch( Document.CLASS_NAME, "doc", phrase );
SearchSpecification searchSpecification = buildSearch( "MWORLDTYPE", "mworldType", phrase );
Search search = new Search( ifs, searchSpecification );
search.open();
SearchResultObject [] results = search.getItems();
search.close();
if( results != null )
System.out.println("The number of object founds are " + results.length);
for( int i = 0; i < results.length; i++ )
SearchResultObject sro = results [ i ];
Document doc = ( Document ) sro.getLibraryObject( Document.CLASS_NAME );
System.out.println( "Document : " + doc.getName() + ", path =" doc.getAnyFolderPath() " Score (query1) = " + sro.getScore("query1"));
doc.filterContent( false );
BufferedReader reader = new BufferedReader( doc.getFilteredContent() );
try
for( String nextLine = reader.readLine();
nextLine != null;
nextLine = reader.readLine() )
//System.out.println( nextLine );
catch( IOException ioe )
throw new IfsException( 9999, ioe );
else
System.out.println("No Results Found");
public void setPhrase(String str) {
phrase = str;
* Please complete the missing tags for buildSearch
* @param
* @return
* @throws
* @pre
* @post
public SearchSpecification buildSearch( String className, String fileExtension, String phrase )
throws IfsException
// Document.DescriptionAttribute contains 'phrase';
AttributeQualification aq1 = new AttributeQualification();
//aq1.setAttribute( Document.CLASS_NAME, PublicObject.NAME_ATTRIBUTE );
aq1.setAttribute( "MWORLDTYPE", PublicObject.NAME_ATTRIBUTE );
aq1.setOperatorType( AttributeQualification.LIKE );
aq1.setCaseIgnored( true );
//aq1.setValue( "%doc" );
aq1.setValue( "%mworldType" );
// Document.ContentObject = ContentObject.ID
JoinQualification jq1 = new JoinQualification();
jq1.setLeftAttribute( className, Document.CONTENTOBJECT_ATTRIBUTE );
jq1.setRightAttribute( ContentObject.CLASS_NAME, null );
// Combine the Attribute and Join Qualifications
SearchClause searchClause = new SearchClause( aq1, jq1, SearchClause.AND );
// Create the Content Query 'Document Body contains phrase...' and add it in.
String queryName = "query1";
ContextQualification contentClause = new ContextQualification();
contentClause.setQuery( phrase );
contentClause.setName( queryName );
System.out.println("Search phrase =" + phrase);
searchClause = new SearchClause( searchClause, contentClause, SearchClause.AND );
// Add in the FreeForm Search....
//FreeFormQualification fq1 = new FreeFormQualification();
//fq1.setSqlExpression("contains(description,'script',2) > 0");
//searchClause = new SearchClause( searchClause, fq1, SearchClause.AND);
// Set up th e Search Class Spec.
SearchClassSpecification scs = new SearchClassSpecification();
// Add in the Class for the Where Clause
String [] searchClasses = new String []
className, "DOCUMENT",
ContentObject.CLASS_NAME
scs.addSearchClasses( searchClasses );
// Add in the Class for the Select Clause
scs.addResultClass( className );
// Define the Order by Clause
// The List of Classes for the Order Clause
String [] classNames = new String []
ContentObject.CLASS_NAME
// The List of Attibutes for the Order Clause.
String [] attributes = new String []
ContextQualification.ORDER_PREFIX + "." + queryName
// The Ordering for the Attributes in the Order Clause
boolean [] sortOrder = new boolean []
false
SearchSortSpecification sss = new SearchSortSpecification( classNames, attributes, sortOrder );
// AttributeSearchSpecification searchSpec = new AttributeSearchSpecification();
ContextSearchSpecification searchSpec = new ContextSearchSpecification();
searchSpec.setContextClassname( ContentObject.CLASS_NAME );
// Set the SELECT statement and FROM statement of the search
searchSpec.setSearchClassSpecification( scs );
// Set the WHERE clause of the Search
searchSpec.setSearchQualification( searchClause );
// Set the ORDER by clause of the search
searchSpec.setSearchSortSpecification( sss );
return searchSpec;
* main
* @param args
* Please complete the missing tags for main
* @return
* @throws
* @pre
* @post
public static void main( String [] args )
ExtendedContentSearchXml contentSearch = new ExtendedContentSearchXml();
contentSearch.setPhrase(args[0]);
contentSearch.run();
xml instance
<?xml version="1.0" standalone="yes"?>
<mworldType>
<name> mworld_1.mworldType</name>
<Category1>Administration</Category1>
<sub_category1>General_1</sub_category1>
<topic>Office Protocol_1</topic>
<format_type>Other</format_type>
<language>US English</language>
<submit_company>AMA</submit_company>
<submit_name>Ken Sickles</submit_name>
<submit_date format="mm-dd-yyyy">01-29-2001</submit_date>
<posted_date format="mm-dd-yyyy">01-29-2001</posted_date>
<posted_by>Ken Sickles</posted_by>
<access_level>All</access_level>
<rb_metadata> no meta data </rb_metadata>
<blurb> this is blurb </blurb>
<content_url>www.mworld_1.com </content_url>
<content>My name is Sridevi. This is the content of mworld_1 xml document </content>
</mworldType>
Thank you
Sridevi.
null

Either run ctxsrv on the database machine or do the following using SQL*Plus (logged in as the ifs schema):
exec ctx_ddl.sync_index('globalindexedblob_i')
Read the interMedia Text documentation for more information about updating interMedia Text indexes.

Similar Messages

  • XML content search problem

    Hi, I have posted this message on the Collaboration Suite forum, but I hope someone here can help me:
    How do I perform a content search of an XML file, if I need an attribute match and a tag value match? For example, I have an XML file that contains the following row:
    <element tag="0008,1090" vr="LO" vm="1" len="4" name="Manufacturer's Model Name">9000</element>
    and I'm using "Oracle Content Services Web Services Accelerator with JDeveloper 10.1.2 support", the "SearchOperations" example; my goal is to get that file as a result of a search for "Manufacturer's Model Name" with the value 9000?
    When I search for any attribute name or value ('name' and "Manufacturer's Model Name" in this example), I do not get any results, I get the results only for tag value (9000) search? I have tried with "Manufacturer's Model Name?>9000" as a search string, it doesn't work, is there any other way to do this?
    Pedja

    Is XPath being used?
    Use the XPath expression
    element[@name='Manufacturer's Model Name'][text()='9000']

  • Problem with content search

    Hello everyone,
    Well, i know that's a question that have been already answered but i have the following problem :
    Content search doesn't work. I mean, it used to work when i tried it (1 month ago...). I have a small program using the API that perfectly worked. But, since i have upgraded iFS (from 1.1.6 to 1.1.9) it doesn't work anymore. Intermedia runs (that's the first thing i checked) and attribute search works fine. I tried to launch Intermedia manually (using ctxsrv) but it didn't change anything. Even the advanced search of the web interface doesn't work so it shouldn't come from my code...
    I don't understand what's happening. Could someone help me ? (this week, nothing works as it should...)
    Thanks in advance.
    Regards,
    Guillaume

    Hi Guillaume,
    did you follow the POST installation steps after upgrading from 1.1.6 to 1.1.9 ???
    (as descibed in http://technet.oracle.com/docs/products/ifs/pdf/install_nt_1.1.pdf)
    You need at least populate intermedia text indexes for all existing documents, which can be done via:
    sqlplus ifssys/<ifssys password>
    exec ctx_output.start_log('ifsidx.log')
    update odmm_contentstore set indexedblob=indexedblob;
    commit;
    exec ctx_ddl.sync_index('indexedblob_i');
    exec ctx_output.end_log
    This might take a while....
    HTH,
    Ralf

  • Content Search Web Part with Hover Panel - Problem with positioning with css

    Hi guys!
    I´m having trouble with positioning the hover panel for the Content Search Web Part.
    I used
    this article to help me with luck as far as to the positioning. I´ve tried some inline styling but maybe my knowledge in css is no good enough here.
    Here´s a screenshot from how this looks like. The hover panel generates a gap between the result items, the same height as the hover panel:

    Hi Victoria!
    No the gap comes without any inline css added from me. I´ve tried some inline styling, like z-index and position.
    So, any ideas are welcome.
    Here´s how my Display Template looks like:
    <html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
    <head>
    <title>RC Customer Documents</title>
    <!--[if gte mso 9]><xml>
    <mso:CustomDocumentProperties>
    <mso:TemplateHidden msdt:dt="string">0</mso:TemplateHidden>
    <mso:ManagedPropertyMapping msdt:dt="string">&#39;Link URL&#39;{Link URL}:&#39;Path&#39;,&#39;Line 1&#39;{Line 1}:&#39;Title&#39;,&#39;Line 2&#39;{Line 2}:&#39;&#39;,&#39;FileExtension&#39;,&#39;SecondaryFileExtension&#39;</mso:ManagedPropertyMapping>
    <mso:MasterPageDescription msdt:dt="string">This Item Display Template will show a preview and properties for Record Center Customer Documents</mso:MasterPageDescription>
    <mso:ContentTypeId msdt:dt="string">0x0101002039C03B61C64EC4A04F5361F385106603</mso:ContentTypeId>
    <mso:TargetControlType msdt:dt="string">;#SearchResults;#Content Web Parts;#</mso:TargetControlType>
    <mso:HtmlDesignAssociated msdt:dt="string">1</mso:HtmlDesignAssociated>
    <mso:HtmlDesignConversionSucceeded msdt:dt="string">True</mso:HtmlDesignConversionSucceeded>
    <mso:HtmlDesignStatusAndPreview msdt:dt="string">http://d-records.isbank.is/rc/search/_catalogs/masterpage/Display Templates/Content Web Parts/_isb_record_center/tutorial/RC_CustomerDocuments.html, Conversion successful.</mso:HtmlDesignStatusAndPreview>
    <mso:CrawlerXSLFile msdt:dt="string"></mso:CrawlerXSLFile>
    <mso:HtmlDesignPreviewUrl msdt:dt="string"></mso:HtmlDesignPreviewUrl>
    </mso:CustomDocumentProperties>
    </xml><![endif]-->
    </head>
    <body>
    <!--
    Warning: Do not try to add HTML to this section. Only the contents of the first <div>
    inside the <body> tag will be used while executing Display Template code. Any HTML that
    you add to this section will NOT become part of your Display Template.
    -->
    <script>
    $includeLanguageScript(this.url, "~sitecollection/_catalogs/masterpage/Display Templates/Language Files/{Locale}/CustomStrings.js");
    </script>
    <!--
    Use the div below to author your Display Template. Here are some things to keep in mind:
    * Surround any JavaScript logic as shown below using a "pound underscore" (#_ ... _#) token
    inside a comment.
    * Use the values assigned to your variables using an "underscore pound equals"
    (_#= ... =#_) token.
    -->
    <div id="RC_CustomerDocuments">
    <!--#_
    var id = ctx.ClientControl.get_nextUniqueId();
    var itemId = id + Srch.U.Ids.item;
    var hoverId = id + Srch.U.Ids.hover;
    var hoverUrl = "~sitecollection/_catalogs/masterpage/Display Templates/Content Web Parts/_isb_record_center/tutorial/Item_RC_CustomerDocuments_HoverPanel.js";
    $setResultItem(itemId, ctx.CurrentItem);
    ctx.currentItem_ShowHoverPanelCallback = Srch.U.getShowHoverPanelCallback(itemId, hoverId, hoverUrl);
    ctx.currentItem_HideHoverPanelCallback = Srch.U.getHideHoverPanelCallback();
    var encodedId = $htmlEncode(ctx.ClientControl.get_nextUniqueId() + "_2lines_");
    var linkURL = $getItemValue(ctx, "Link URL");
    linkURL.overrideValueRenderer($urlHtmlEncode);
    var iconURL = Srch.ContentBySearch.getIconSourceFromItem(ctx.CurrentItem);
    var line1 = $getItemValue(ctx, "Line 1");
    var line2 = $getItemValue(ctx, "Line 2");
    line1.overrideValueRenderer($contentLineText);
    line2.overrideValueRenderer($contentLineText);
    var containerId = encodedId + "container";
    var pictureLinkId = encodedId + "pictureLink";
    var pictureId = encodedId + "picture";
    var dataContainerId = encodedId + "dataContainer";
    var line1LinkId = encodedId + "line1Link";
    var line1Id = encodedId + "line1";
    var line2Id = encodedId + "line2";
    _#-->
    <div class="cbs-Item" name="Item" id="_#= $htmlEncode(itemId) =#_" data-displaytemplate="RC_CustomerDocuments" onmouseover="_#= ctx.currentItem_ShowHoverPanelCallback =#_" onmouseout="_#= ctx.currentItem_HideHoverPanelCallback =#_">
    <div id="wrapper">
    <div id="_#= $htmlEncode(hoverId) =#_" ></div>
    </div>
    <a class="cbs-ItemLink" title="_#= $htmlEncode(line1.defaultValueRenderer(line1)) =#_" id="_#= pictureLinkId =#_">
    <img class="cbs-Thumbnail" src="_#= $urlHtmlEncode(iconURL) =#_" alt="_#= $htmlEncode(line1.defaultValueRenderer(line1)) =#_" id="_#= pictureId =#_" />
    </a>
    <div class="cbs-Detail" id="_#= dataContainerId =#_">
    <a class="cbs-Line1Link ms-noWrap ms-displayBlock" href="_#= linkURL =#_" title="_#= $htmlEncode(line1.defaultValueRenderer(line1)) =#_" id="_#= line1LinkId =#_">_#= line1 =#_</a>
    <!--#_
    if(!line2.isEmpty)
    _#-->
    <div class="cbs-Line2 ms-noWrap" title="_#= $htmlEncode(line2.defaultValueRenderer(line2)) =#_" id="_#= line2Id =#_">_#= line2 =#_</div>
    <!--#_
    _#-->
    </div>
    </div>
    </div>
    </body>
    </html>
    And here´s the hover panel:
    <html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
    <head>
    <title>RC Customer Documents Hover Panel</title>
    <!--[if gte mso 9]><xml>
    <mso:CustomDocumentProperties>
    <mso:TemplateHidden msdt:dt="string">0</mso:TemplateHidden>
    <mso:MasterPageDescription msdt:dt="string">Displays a result hover panel tailored for a Portable Document Format (PDF) document.</mso:MasterPageDescription>
    <mso:ContentTypeId msdt:dt="string">0x0101002039C03B61C64EC4A04F5361F385106603</mso:ContentTypeId>
    <mso:TargetControlType msdt:dt="string">;#SearchHoverPanel;#</mso:TargetControlType>
    <mso:HtmlDesignAssociated msdt:dt="string">1</mso:HtmlDesignAssociated>
    <mso:ManagedPropertyMapping msdt:dt="string">&#39;Title&#39;:&#39;Title&#39;,&#39;Path&#39;:&#39;Path&#39;,&#39;Description&#39;:&#39;Description&#39;,&#39;EditorOWSUSER&#39;:&#39;EditorOWSUSER&#39;,&#39;LastModifiedTime&#39;:&#39;LastModifiedTime&#39;,&#39;CollapsingStatus&#39;:&#39;CollapsingStatus&#39;,&#39;DocId&#39;:&#39;DocId&#39;,&#39;HitHighlightedSummary&#39;:&#39;HitHighlightedSummary&#39;,&#39;HitHighlightedProperties&#39;:&#39;HitHighlightedProperties&#39;,&#39;FileExtension&#39;:&#39;FileExtension&#39;,&#39;ViewsLifeTime&#39;:&#39;ViewsLifeTime&#39;,&#39;ParentLink&#39;:&#39;ParentLink&#39;,&#39;FileType&#39;:&#39;FileType&#39;,&#39;IsContainer&#39;:&#39;IsContainer&#39;,&#39;SecondaryFileExtension&#39;:&#39;SecondaryFileExtension&#39;,&#39;DisplayAuthor&#39;:&#39;DisplayAuthor&#39;,&#39;ServerRedirectedURL&#39;:&#39;ServerRedirectedURL&#39;</mso:ManagedPropertyMapping>
    <mso:HtmlDesignConversionSucceeded msdt:dt="string">True</mso:HtmlDesignConversionSucceeded>
    <mso:HtmlDesignStatusAndPreview msdt:dt="string">http://d-records.isbank.is/rc/search/_catalogs/masterpage/Display%20Templates/Content%20Web%20Parts/_isb_record_center/tutorial/Item_RC_CustomerDocuments_HoverPanel.html, Conversion successful.</mso:HtmlDesignStatusAndPreview>
    <mso:CrawlerXSLFile msdt:dt="string"></mso:CrawlerXSLFile>
    <mso:HtmlDesignPreviewUrl msdt:dt="string"></mso:HtmlDesignPreviewUrl>
    </mso:CustomDocumentProperties>
    </xml><![endif]-->
    </head>
    <body>
    <div id="Item_RC_CustomerDocuments_HoverPanel">
    <!--#_
    var i = 0;
    var id = ctx.CurrentItem.csr_id;
    ctx.CurrentItem.csr_ShowFollowLink = true;
    ctx.CurrentItem.csr_ShowViewLibrary = true;
    ctx.currentItem_ShowChangedBySnippet = true;
    _#-->
    <div class="ms-srch-hover-innerContainer ms-srch-hover-standardSize" id="_#= $htmlEncode(id + HP.ids.inner) =#_">
    <div class="ms-srch-hover-arrowBorder" id="_#= $htmlEncode(id + HP.ids.arrowBorder) =#_"></div>
    <div class="ms-srch-hover-arrow" id="_#= $htmlEncode(id + HP.ids.arrow) =#_"></div>
    <div class="ms-srch-hover-content" id="_#= $htmlEncode(id + HP.ids.content) =#_" data-displaytemplate="RCCustomerDocumentsHoverPanel">
    <div id="_#= $htmlEncode(id + HP.ids.header) =#_" class="ms-srch-hover-header">
    _#= ctx.RenderHeader(ctx) =#_
    </div>
    <div id="_#= $htmlEncode(id + HP.ids.body) =#_" class="ms-srch-hover-body">
    _#= ctx.RenderBody(ctx) =#_
    </div>
    <div id="_#= $htmlEncode(id + HP.ids.actions) =#_" class="ms-srch-hover-actions">
    _#= ctx.RenderFooter(ctx) =#_
    </div>
    </div>
    </div>
    </div>
    </body>
    </html>
    Thnx :)

  • Content search webpart in sharepoint 2013 paging is not not working for anonymous users on IE9, IE10 and Firefox

    Dear All,
     Issue in CQWP paging on IE9, IE10 and Firefox
    We have created CQWP in SharePoint 2013 for images rollup and its paging perfectly working for authenticated users on all browsers but it’s not working on public facing site for specific browser
     while we are trying to click on paging getting 
    something went wrong and correlation  with correlation id
    We did log analysis and getting different kind of problem description on every click some time contents authentications error, sometime memory
    Once I put webpart inside the  <!--MS:<ZoneTemplate>--> its completely stop working
      so we placed webpart outside  <!--MS:<ZoneTemplate>--> currently
    Strange point is its working on IE11. Please help us its highly appreciated
    Code Details :
    <div data-name="WebPartZone">
    <!--CS: Start Web Part Zone Snippet-->
    <!--SPM:<%@Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>-->
    <div xmlns:ie="ie">
    <!--MS:<WebPartPages:WebPartZone runat="server" AllowPersonalization="false" ID="x5d2d1828b2b44612974f72caded2bcd3" FrameType="TitleBarOnly" Orientation="Vertical">-->
    <!--MS:<ZoneTemplate>-->
    <!--ME:</ZoneTemplate>-->
    <!--ME:</WebPartPages:WebPartZone>-->
    </div>
    <!--CE: End Web Part Zone Snippet-->
    <!--CS: Start Content Search Snippet-->
    <!--SPM:<%@Register Tagprefix="spsswc" 
    Namespace="Microsoft.Office.Server.Search.WebControls" Assembly="Microsoft.Office.Server.Search, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>-->
    <!--SPM:<%@Register Tagprefix="a2e8ead9d" 
    Namespace="Microsoft.Office.Server.Search.WebControls" Assembly="Microsoft.Office.Server.Search, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>-->
                            <!--MS:<spsswc:ContentBySearchWebPart runat="server" AlwaysRenderOnServer="False"
    ResultType="" NumberOfItems="12" DataProviderJSON="{&#34;QueryGroupName&#34;:&#34;Default&#34;,&#34;QueryPropertiesTemplateUrl&#34;:&#34;sitesearch://webroot&#34;,&#34;IgnoreQueryPropertiesTemplateUrl&#34;:false,&#34;SourceID&#34;:&#34;8413cd39-2156-4e00-b54d-11efd9abdb89&#34;,&#34;SourceName&#34;:&#34;Local
    SharePoint Results&#34;,&#34;SourceLevel&#34;:&#34;Ssa&#34;,&#34;CollapseSpecification&#34;:&#34;&#34;,&#34;QueryTemplate&#34;:&#34;path:\&#34;http://thepubauth.viacom.com/sites/vh1press/Shows/Show assets\&#34;
    PictureURL:\&#34;/sites/vh1press/Shows/Show assets/{Page.ID}/\&#34; (ContentTypeId:0x0101009148F5A04DDD49cbA7127AADA5FB792B00AADE34325A8B49cdA8BB4DB53328F214* OR ContentTypeId:0x010102*)&#34;,&#34;FallbackSort&#34;:[{&#34;p&#34;:&#34;LastModifiedTime&#34;,&#34;d&#34;:1},{&#34;p&#34;:&#34;Title&#34;,&#34;d&#34;:0}],&#34;FallbackSortJson&#34;:&#34;[{\&#34;p\&#34;:\&#34;LastModifiedTime\&#34;,\&#34;d\&#34;:1},{\&#34;p\&#34;:\&#34;Title\&#34;,\&#34;d\&#34;:0}]&#34;,&#34;RankRules&#34;:null,&#34;RankRulesJson&#34;:&#34;null&#34;,&#34;AsynchronousResultRetrieval&#34;:false,&#34;SendContentBeforeQuery&#34;:true,&#34;BatchClientQuery&#34;:true,&#34;FallbackLanguage&#34;:-1,&#34;FallbackRankingModelID&#34;:&#34;&#34;,&#34;EnableStemming&#34;:true,&#34;EnablePhonetic&#34;:false,&#34;EnableNicknames&#34;:false,&#34;EnableInterleaving&#34;:false,&#34;EnableQueryRules&#34;:true,&#34;EnableOrderingHitHighlightedProperty&#34;:false,&#34;HitHighlightedMultivaluePropertyLimit&#34;:-1,&#34;IgnoreContextualScope&#34;:true,&#34;ScopeResultsToCurrentSite&#34;:false,&#34;TrimDuplicates&#34;:false,&#34;Properties&#34;:{&#34;TryCache&#34;:true,&#34;Scope&#34;:&#34;{Site.URL}&#34;,&#34;ListId&#34;:&#34;00000000-0000-0000-0000-000000000000&#34;,&#34;UpdateLinksForCatalogItems&#34;:true,&#34;EnableStacking&#34;:true},&#34;PropertiesJson&#34;:&#34;{\&#34;TryCache\&#34;:true,\&#34;Scope\&#34;:\&#34;{Site.URL}\&#34;,\&#34;ListId\&#34;:\&#34;00000000-0000-0000-0000-000000000000\&#34;,\&#34;UpdateLinksForCatalogItems\&#34;:true,\&#34;EnableStacking\&#34;:true}&#34;,&#34;ClientType&#34;:&#34;ContentSearchRegular&#34;,&#34;UpdateAjaxNavigate&#34;:true,&#34;SummaryLength&#34;:180,&#34;DesiredSnippetLength&#34;:90,&#34;PersonalizedQuery&#34;:false,&#34;FallbackRefinementFilters&#34;:null,&#34;IgnoreStaleServerQuery&#34;:false,&#34;RenderTemplateId&#34;:&#34;DefaultDataProvider&#34;,&#34;AlternateErrorMessage&#34;:null,&#34;Title&#34;:&#34;&#34;}"
    BypassResultTypes="True" ItemTemplateId="~sitecollection/_catalogs/masterpage/Display Templates/Content Web Parts/DT_Images.js" GroupTemplateId="~sitecollection/_catalogs/masterpage/Display Templates/Content Web Parts/Group_Content.js"
    ResultsPerPage="9" SelectedPropertiesJson="[&#34;PublishingImage&#34;,&#34;PictureURL&#34;,&#34;PictureThumbnailURL&#34;,&#34;Path&#34;,&#34;Title&#34;,&#34;Description&#34;,&#34;SecondaryFileExtension&#34;,&#34;ContentTypeId&#34;]"
    HitHighlightedPropertiesJson="[&#34;Title&#34;,&#34;Path&#34;,&#34;Author&#34;,&#34;SectionNames&#34;,&#34;SiteDescription&#34;]" AvailableSortsJson="null" ShowBestBets="False" ShowPersonalFavorites="False"
    ShowDefinitions="False" ShowDidYouMean="False" PreloadedItemTemplateIdsJson="null" QueryGroupName="Default" RenderTemplateId="~sitecollection/_catalogs/masterpage/Display Templates/Content Web Parts/Control_ListWithPaging.js"
    StatesJson="{}" ServerIncludeScriptsJson="null" Title="Content Search" FrameType="None" SuppressWebPartChrome="False" Description="&#60;%$Resources:Microsoft.Office.Server.Search,CBS_Description;%&#62;"
    IsIncluded="True" ZoneID="ImportedPartZone" PartOrder="0" FrameState="Normal" AllowRemove="True" AllowZoneChange="True" AllowMinimize="True" AllowConnect="True" AllowEdit="True"
    AllowHide="True" IsVisible="True" DetailLink="" HelpLink="" HelpMode="Modeless" Dir="Default" PartImageSmall="" MissingAssembly="&#60;%$Resources:core,ImportErrorMessage;%&#62;"
    ImportErrorMessage="&#60;%$Resources:core,ImportErrorMessage;%&#62;" PartImageLarge="" IsIncludedFilter="" ExportControlledProperties="True" ConnectionID="00000000-0000-0000-0000-000000000000" ID="g_9f61c988_228e_4f91_8d67_04314f144f48"
    ChromeType="None" ExportMode="All" __MarkupType="vsattributemarkup" __WebPartId="{9f61c988-228e-4f91-8d67-04314f144f48}" WebPart="true" Height="" Width="">-->
    <!--ME:</spsswc:ContentBySearchWebPart>-->
    <!--PS: Start of READ-ONLY PREVIEW (do not modify)--><div ms-webpart-chrome-fullWidth "><div webpartid="00000000-0000-0000-0000-000000000000" haspers="true" id="WebPartWPQ1" width="100%" noindex
    " onlyformepart="true" allowdelete="false" ><div style="display: none;"></div><div componentid="ctl00_ctl00_PlaceHolderMain_ComponentMain_ComponentPropertyGrids_g_9f61c988_228e_4f91_8d67_04314f144f48_csr"
    id="ctl00_ctl00_PlaceHolderMain_ComponentMain_ComponentPropertyGrids_g_9f61c988_228e_4f91_8d67_04314f144f48_csr" style="display: none;"></div><noscript>&lt;div id="ctl00_ctl00_PlaceHolderMain_ComponentMain_ComponentPropertyGrids_g_9f61c988_228e_4f91_8d67_04314f144f48_noscript"&gt;It
    looks like your browser does not have JavaScript enabled. Please turn on JavaScript and try again.&lt;/div&gt;</noscript><div id="ctl00_ctl00_PlaceHolderMain_ComponentMain_ComponentPropertyGrids_g_9f61c988_228e_4f91_8d67_04314f144f48"><div><div
    id="WebPartWPQ2_ChromeTitle"><span title="" id="WebPartTitleWPQ2"><h2 style="text-align:justify;"><nobr><span></span><span id="WebPartCaptionWPQ2"></span></nobr></h2></span></div><div
    webpartid="00000000-0000-0000-0000-000000000000" haspers="true" id="WebPartWPQ2" width="100%" ms-WPBorder noindex ms-wpContentDivSpace " onlyformepart="true" allowdelete="false" ><div componentid="ctl00_ctl00_PlaceHolderMain_ComponentMain_ComponentPropertyGrids_g_9f61c988_228e_4f91_8d67_04314f144f48_ctl00_csr"
    id="ctl00_ctl00_PlaceHolderMain_ComponentMain_ComponentPropertyGrids_g_9f61c988_228e_4f91_8d67_04314f144f48_ctl00_csr"><div id="DataProvider" name="Control"></div></div><noscript>&lt;div id="ctl00_ctl00_PlaceHolderMain_ComponentMain_ComponentPropertyGrids_g_9f61c988_228e_4f91_8d67_04314f144f48_ctl00_noscript"&gt;It
    looks like your browser does not have JavaScript enabled. Please turn on JavaScript and try again.&lt;/div&gt;</noscript><div id="ctl00_ctl00_PlaceHolderMain_ComponentMain_ComponentPropertyGrids_g_9f61c988_228e_4f91_8d67_04314f144f48_ctl00"></div><div></div></div></div></div><div></div></div></div><!--PE:
    End of READ-ONLY PREVIEW-->
    <!--CE: End Content Search Snippet-->
          </div>

    Hi,
    In the “Property Mappings” of the Content Search Web Part, we can see that the Picture field will only display the value retrieved from “PublishingImage;PictureURL;PictureThumbnailURL”,
    because there is corresponding column in OOTB Document Library holds the valid value of a thumbnail image for a document, that’s why documents from Document Library display no thumbnail image in a Content Search Web part.
    If you want to display thumbnail images for documents of Document Library, you can add a custom Picture column to hold the thumbnail image of a document, set the “Property
    Mappings” to display this custom Picture column.
    By doing this, every time uploading a document to this library, setting a thumbnail image(provided by common users, not generated by SharePoint automatically) for
    that custom Picture column, in the Content Search Web Part, the thumbnail image will display.
    Thanks
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Opening documents in Content Search Webpart

    Hi, 
    I have configured Office Web app server with my SharePoint farm. It is working fine with document libraries. I have added the content search web part on home page. Office web app is not opening documents from CSWP. If i click in the document in CSWP, it
    always prompts me to download the document.
    Is this behavior is by design or i am missing some configuration in CSWP?
    I have found article about same problem in Content Search Web Part. 
    http://jeroenvanree.wordpress.com/2012/10/18/sharepoint-2010-content-query-web-part-open-office-documents-in-office-web-app/
    Same work around for CSWP in SharePoint 2013? Any help?

    I see it a default behavior
    Try below as workaround
    http://jeroenvanree.wordpress.com/2012/10/18/sharepoint-2010-content-query-web-part-open-office-documents-in-office-web-app/
    First I added a couple of templates to get the File and Site Paths I needed to build the URL
    ContentQueryMain.xsl
    Template:
    <xsl:template name=”OuterTemplate.StripLast”>
    <xsl:param name=”pText”/>
    <xsl:param name=”pDelim” select=”‘/’”/>
    <xsl:if test=”contains($pText, $pDelim)”>
    <xsl:value-of select=”substring-before($pText, $pDelim)”/>
    <xsl:if test=”contains(substring-after($pText, $pDelim), $pDelim)”>
    <xsl:value-of select=”$pDelim”/>
    </xsl:if>
    <xsl:call-template name=”OuterTemplate.StripLast”>
    <xsl:with-param name=”pText” select=”substring-after($pText, $pDelim)”/>
    <xsl:with-param name=”pDelim” select=”$pDelim”/>
    </xsl:call-template>
    </xsl:if>
    </xsl:template>
    This template gets the Site Path out of the FilePathRef value of the file
    ItemStyle.xsl
    Call the template
    <xsl:variable name=”SitePath“>
    <xsl:variable name=”p” select=”@Description“/>
    <xsl:call-template name=”OuterTemplate.StripLast”>
    <xsl:with-param name=”pText” select=”$p”/>
    </xsl:call-template>
    </xsl:variable>
    In this case the Description field out of the content query webpart properties is used to fill the
    FileRefPath
    The next thing is to use this variable in the build of the string:
    <a href=”/{$SitePath}/_layouts/WordViewer.aspx?id={$SafeLinkUrl}” title=”{@LinkToolTip}”>
    <xsl:if test=”$ItemsHaveStreams = ‘True’”>
    <xsl:attribute name=”onclick”>
    <xsl:value-of select=”@OnClickForWebRendering”/>
    </xsl:attribute>
    </xsl:if>
    <xsl:if test=”$ItemsHaveStreams != ‘True’ and @OpenInNewWindow = ‘True’”>
    <xsl:attribute name=”onclick”>
    <xsl:value-of disable-output-escaping=”yes” select=”$OnClickTargetAttribute”/>
    </xsl:attribute>
    </xsl:if>
    <xsl:value-of select=”$DisplayTitle”/>
    </a>
    If this helped you resolve your issue, please mark it Answered

  • Office 365 - content search web part

    Hi,
    I have an office 365 site, and in one of the page, i had added 4 Content search web parts each of it having its own custom display templates.
    Now, the problem is when the page is browsed (intermittent) or edited (always), the CSWP's throwing error as 'Sorry, something went wrong'. And I found that, the corresponding .js files are not getting loaded, including the language script, because of which
    we are getting this error.
    Please assist.
    Thanks
    Senthu

    Hi Senthu,
    This error occurs may be due to the display template has not been published as a major version.
    Please go to the Master pages and page layouts in site settings > Display Templates > Content Web Parts > find the html file of the display templates used in your content search web part and then click the triangle and select Publish a Major Version.
    Reference:
    http://blogs.msdn.com/b/kaushalendra/archive/2013/08/16/sorry-something-went-wrong-in-content-by-search-web-part-for-some-users.aspx
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Using Content search web part to retrieve items from another site collection

    I have a web application that contains two site collections(team site + enterprise wiki), with the following URLs:-
    -http://applicationname/teamsite
    -http://applicationname/enterprisewiki
    Now I need to display the latest 10 wiki pages from the enterprise wiki site collection(according to the modified date) inside the team site. So I read that using Content search web part allow for cross-site content query. Currently I added a new content
    search web part , inside my team site, and I click on “change query” button. But I am not sure how I can reference the enterprise wiki site collection's wiki page library and to specify that I need to get the latest 10 wiki pages , inside the following dialog:-
    Basically this setting partially worked for me, I provide the following settings inside the “Build Your Query” dialog:-
    From the “Select a Query” I defined the following:- “items matching content type(system).”
    Restrict by app : “Do not restrict results by app”
    Restrict by content type “Enterprise Wiki Page”.
    This showed all the sites, lists and even pages are based on the “Enterprise Wiki Page” content type. But I am facing these three problems:-
    1. The above setting showed only the sites,lists and pages matching the “Enterprise Wiki Page” content type, that exists on another web application, and not that exists inside the current web application.
    2. To test the web part , I got the following results, But I was not able to add additional info for the items such as created by, modified by ,etc.
    3.  Also there is no way to sort the wiki pages by the modified date, as in the Sorting tab inside the “Build Your query” dialog I cannot find the “modified” inside the Soft by list
    So can anyone advice how to fix these three problems

    Hi,
    1. In "Build Your Query" dialog, we can select "Specify a URL" in
    Restrict by app and enter another site URL.
    2. If you want to add more information for the items, we need customize the display template, the following link for your reference:
    http://blogs.technet.com/b/sharepoint_quick_reads/archive/2013/08/01/sharepoint-2013-customize-display-template-for-content-by-search-web-part-cswp-part-1.aspx
    3. In the Sorting tab, we can use "LastModifiedTime" to instead of "Modified".
    Best Regards 
    Dennis Guo
    TechNet Community Support

  • Content search web part in shar Point 2013

    how to write query in which parameters will comes from end user and depend on which result will come

    Hi,
    You can add the query parameter in the content search web part as shown in the below screenshot.  "MyParameter1" is the parameter you will be passing from the URL.
    Please mark it answered, if your problem resolved.

  • Content Search web part - Display Project Enterprise Custom Fields and Lookup Tables

    My ultimate goal is to display a rollup table of our active projects (from PWA) on another site collection using the content search web part. I can return default properties (such as the project name, author and URL) fairly easily using the same basic steps
    in the link below.
    http://en.share-gate.com/blog/roll-up-sharepoint-2013-sites-using-search
    My problem is that I want to also display information associated with each project from our PWA enterprise custom fields (such as risk, phase, etc.)
    Because these custom fields do not appear to be site columns, I'm at a bit of a loss as to how this data is searched / indexed / mapped.
    Is it possible to display PWA enterprise custom fields in a content search web part?

    Hi Jennifer,
    According to your description, my understanding is that you want to display PWA enterprise custom fields in a Content Search web part in SharePoint 2013.
    As your active projects were from different site collection with the Content Search web part, you need to do a crawl for the content source, then create a managed property for the column in CA->Search Service Application->Search Schema. When you create
    the managed property, select Searchable, Queryable, Retrievable.  Then  map it to the crawled property based on the custom column. You can find the crawled property by searching the name of the column in crawled properties.
    More information, please refer to the link:
    http://technet.microsoft.com/en-us/library/jj219667(v=office.15).aspx
    I hope this helps.
    Thanks,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • Content Search Web Part and Managed Property

    Do I have to have cross-site collection publishing feature turned on for the Content Search Web Part to show a managed property?
    I have a list and a column in that list called Colors. I created a managed property out of the crawled property for Colors column. On a page within the same site-collection, I added a content search web part (displays items from the earlier list) and
    trying to display the managed property for Colors to show up for each of the items. For some reason, Colors value is not being displayed for the items.
    Any ideas?

    Thanks, Peter, appreciated. Here is my problem:
    I created a site column and added it to the list. Added an item that has a value for this site column. System automatically generated a crawled property for the site column and also a managed property. Do I still have to perform step # 5 from above?
    Now when I go into the content search web part and change the query to use this managed property as a refiner, it does not work.
    I will try the debugging as you suggested.
    In the meanwhile, Please let me know if you know of anything wrong I am doing.
    UPDATE: I debugged it using IE Dev. Toolbar and the value for that managed property is being returned as null. What could be going wrong? How can I further troubleshoot this problem?

  • Content Search Web Part displaying wrong Results for anonymous Users.

    HI Forum Group,
    I am getting Wrong results for my content search web part. The requirement is to show the News Description for the selected news item.
    I have a catalog site which stores News like 
    News1
    News2
    News3
    as Items. and i have connected this catalog in publishing site which is anonymous. In the publishing site created one page "News.aspx"added search results webpart which shows all the news item. Added one page "Description.aspx" to show
    description to show the selected news item.
    When ever user selects any news from news.aspx page it will redirected to description.aspx with the selected item ID
    The "Description.aspx" the search results page gets the data based on the URL by QueryString parameter as shown below
    The problem is, if i multiple items to open in tabs all the items are showing the data same as the first selected item, though the article ID is different.
    Thanks
    Sithender

    Hi,
    Thank you for your feedback on how you were successful in resolving this issue.
    Your solution will benefit many other users, and we really value having you as a Microsoft customer.
    Have a nice day!
    Best Regards,
    Lisa Chen
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Content Search Web Part Error / Control_list.js not found

    Hello,
    I am trying to use the Content Search Web Part but I receive an error:
    Display Error: The display template had an error. You can correct it by fixin the template or by changing the display template used in either the Web Part properties or Result Types;
    Template '~sitecollection/_catalog/masterpage/Display Templates/Content Web Parts/Control_List.js not found or has syntax errors. (Load Template;)
    I am working on a fresh installation (out of the box) Sharepoint 2013 SP1 on which I have applied the latest CU.
    I have checked the folder and I only have one file 'Group_Content.js'. I searched over the web and I found out that I am missing a lot of file in that folder.
    Anybody can help me solve this without re-installation of SP?
    Thank you!

    Yep you are missing a lot of display templates if you only have the one.
    Is this the root site collection or a new site-collection under /sites? If it's the root site collection, then I would suggest creating a new web application and site collection and seeing if the problem exists in that. If it does, then you may need to repair/rebuild
    your SharePoint installation.
    If it's a sub-site-collection and the root site doesn't have that problem, try creating a new site-collection and testing in that. Also ensure that you have publishing features enabled in the site collection.
    Paul.
    Please ensure that you mark a question as Answered once you receive a satisfactory response. This helps people in future when searching and helps prevent the same questions being asked multiple times.

  • Content Search Web Part - Sorting not working

    I recently tried the new Content Search Web Part for which i see tremendous potential. I wanted to use it to show a certain type of pages and that was not a problem (i added a url as the source where i got the pages from). I mapped the correct fields so
    that it showed image, title and modified date. I then tried the advanced mode and told it to sort by the modified date, however any way I tried to apply this sort it just would not save my settings and reverted back to the default sorting. Is there anything
    else you need to do to get Sorting to work?
    /Anders

    I hadn't tried looking with REST, but that's a good suggestion.
    In the interim, I found this on TechNet:
    http://technet.microsoft.com/en-us/library/jj679902.aspx#BKMK_MapCPtoRefinableMP<o:p></o:p>
    When you search for a crawled property, you may find two crawled properties
    that represent the same content. For example, a site column of type Text named
    Color will during crawl discover two crawled properties: ows_Color and
    ows_q_TEXT_Color. Crawled properties that begin with either ows_r<four
    letter code>, ows_q<four letter code>, or ows_taxId are automatically
    created crawled properties. When you select a crawled property to map to a
    refinable managed property, make sure that you don't map the automatically
    created crawled property. Instead, always map the crawled property that begins
    with ows_.
    So clearly (as clearly as the doc makes it) I need to use ows_ArticleStartDate. I've made sure that crawled property is the one I'm using, but I'm still not seeing any effect.
    As for the sorting model, that only seems to be relevant for Rank sorting, right?
    M.
    Sympraxis Consulting LLC -
    Marc D Anderson's Blog - @sympmarc -
    jQuery Library for SharePoint Web Services (SPServices)

  • Content Search Web Part not work for Office Web Apps

    Hi ,
    In Content Search Web Part word documents are not able to open in browser,but in document library  its working.
    Office Web Apps not work in Content search web part
    Please help me
    Regards
    Sachin

    Below is the display template to open the document in OWA.
    <html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"> 
    <head>
    <title>AdSpace Picture on top, 3 lines on bottom</title>
    <!--[if gte mso 9]><xml>
    <mso:CustomDocumentProperties>
    <mso:TemplateHidden msdt:dt="string">0</mso:TemplateHidden>
    <mso:ManagedPropertyMapping msdt:dt="string">&#39;Picture URL&#39;{Picture URL}:&#39;PublishingImage;PictureURL;PictureThumbnailURL&#39;,&#39;Link URL&#39;{Link URL}:&#39;Path&#39;,&#39;Line 1&#39;{Line
    1}:&#39;Title&#39;,&#39;Line 2&#39;{Line 2}:&#39;Description&#39;,&#39;Line 3&#39;{Line 3}:&#39;&#39;,&#39;FileExtension&#39;,&#39;SecondaryFileExtension&#39;,&#39;ContentTypeId&#39;,&#39;ServerRedirectedURL&#39;</mso:ManagedPropertyMapping>
    <mso:MasterPageDescription msdt:dt="string">This Item Display Template will show a 304x100 picture of the item on top. The title and the default item description will display to the bottom of the picture with an additional line that is available
    for a custom managed property.</mso:MasterPageDescription>
    <mso:ContentTypeId msdt:dt="string">0x0101002039C03B61C64EC4A04F5361F385106603</mso:ContentTypeId>
    <mso:TargetControlType msdt:dt="string">;#Content Web Parts;#</mso:TargetControlType>
    <mso:HtmlDesignAssociated msdt:dt="string">1</mso:HtmlDesignAssociated>
    <mso:_dlc_DocId msdt:dt="string">ZRMVMDDDEAE7-1-215</mso:_dlc_DocId>
    <mso:_dlc_DocIdItemGuid msdt:dt="string">583b0835-32ff-4d1c-983f-b6ff4a0ef956</mso:_dlc_DocIdItemGuid>
    <mso:_dlc_DocIdUrl msdt:dt="string">http://sp2013-dev-6:7000/sites/adspace/_layouts/15/DocIdRedir.aspx?ID=ZRMVMDDDEAE7-1-215, ZRMVMDDDEAE7-1-215</mso:_dlc_DocIdUrl>
    <mso:HtmlDesignConversionSucceeded msdt:dt="string">True</mso:HtmlDesignConversionSucceeded>
    <mso:HtmlDesignStatusAndPreview msdt:dt="string">http://sp2013-dev-6:7000/sites/adspace/_catalogs/masterpage/Display Templates/Content Web Parts/Item_PictureOnTop.html, Conversion successful.</mso:HtmlDesignStatusAndPreview>
    </mso:CustomDocumentProperties>
    </xml><![endif]-->
    </head>
    <body>
        <!--
                Warning: Do not try to add HTML to this section. Only the contents of the first <div>
                inside the <body> tag will be used while executing Display Template code. Any HTML that
                you add to this section will NOT become part of your Display Template.
        -->
        <script>
            $includeLanguageScript(this.url, "~sitecollection/_catalogs/masterpage/Display Templates/Language Files/{Locale}/CustomStrings.js");
        </script>
        <!--
            Use the div below to author your Display Template. Here are some things to keep in mind:
            * Surround any JavaScript logic as shown below using a "pound underscore" (#_ ... _#) token
            inside a comment.
            * Use the values assigned to your variables using an "underscore pound equals"
            (_#= ... =#_) token.
        -->
        <div id="Item_PictureOnTop">
    <!--#_
    var useWACUrl = !$isEmptyString(ctx.CurrentItem.ServerRedirectedURL);
            if(ctx.ScriptApplicationManager && ctx.ScriptApplicationManager.states){
                useWACUrl = (useWACUrl && !ctx.ScriptApplicationManager.states.openDocumentsInClient);
            var appAttribs = "";
            if(!useWACUrl)
                if (!$isEmptyString(ctx.CurrentItem.csr_OpenApp)) { appAttribs += "openApp=\"" + $htmlEncode(ctx.CurrentItem.csr_OpenApp) + "\"" }; 
                if (!$isEmptyString(ctx.CurrentItem.csr_OpenControl)) { appAttribs += " openControl=\"" + $htmlEncode(ctx.CurrentItem.csr_OpenControl) + "\"" };
            var url = ctx.CurrentItem.csr_Path;
         if($isEmptyString(url)){
                if(useWACUrl)
                    url = ctx.CurrentItem.ServerRedirectedURL;
                } else {
                    url = ctx.CurrentItem.Path;
    var encodedId = $htmlEncode(ctx.ClientControl.get_nextUniqueId() + "_pictureOnTop_");
    var linkURL = $getItemValue(ctx, "Link URL");
    linkURL.overrideValueRenderer($urlHtmlEncode);
     var iconURL = Srch.ContentBySearch.getIconSourceFromItem(ctx.CurrentItem);
    var line1 = $getItemValue(ctx, "Line 1");
    var setLineHeightRenderer = function(valueInfoObj)
        if(!$isNull(valueInfoObj) && !valueInfoObj.isEmpty)
            if(!$isNull(valueInfoObj.defaultValueRenderer))
                return valueInfoObj.defaultValueRenderer(valueInfoObj);
            else
                return valueInfoObj.toString();
        else
            return "&nbsp;";
    var line2 = $getItemValue(ctx, "Line 2");
    line2.overrideValueRenderer(setLineHeightRenderer);
    var line3 = $getItemValue(ctx, "Line 3");
    line3.overrideValueRenderer(setLineHeightRenderer);
    var pictureURL = $getItemValue(ctx, "Picture URL");
    var pictureId = encodedId + "picture";
    var pictureMarkup = Srch.ContentBySearch.getPictureMarkup(pictureURL, 304, 100, ctx.CurrentItem, "cbs-pictureOnTopImg", line1, pictureId);
    var containerId = encodedId + "container";
    var pictureLinkId = encodedId + "pictureLink";
    var pictureContainerId = encodedId + "pictureContainer";
    var dataContainerId = encodedId + "dataContainer";
    var line1LinkId = encodedId + "line1Link";
    var line1Id = encodedId + "line1";
    var line2Id = encodedId + "line2";
    var line3Id = encodedId + "line3";
     _#-->
            <div class="top-content-box" id="_#= containerId =#_" data-displaytemplate="ItemPictureOnTop">
                <div class="top-content-img" id="_#= pictureContainerId =#_">
                    <a class="cbs-pictureImgLink" href="_#= $urlHtmlEncode(url) =#_" title="_#= $htmlEncode(line1) =#_" target="_blank" id="_#= pictureLinkId =#_">
                        _#= pictureMarkup =#_
                    </a>
                </div>
                    <h3 id="_#= line1Id =#_"><a class="cbs-pictureOnTopLine1Link" target="_blank" href="_#= $urlHtmlEncode(url) =#_" title="_#= $htmlEncode(line1) =#_"
    id="_#= line1LinkId =#_"> _#= line1 =#_ </a></h3>      
                    <span class="content-date" title="_#= $htmlEncode(line2) =#_" id="_#= line2Id =#_"><img class="cbs-Thumbnail" src="_#= $urlHtmlEncode(iconURL) =#_"
    alt="_#= $htmlEncode(line1.defaultValueRenderer(line1)) =#_" id="_#= pictureId =#_" />_#=line2=#_</span>                
            </div>
        </div>
    </body>
    </html>
    Basically,ctx.CurrentItem.ServerRedirectedURL is calculated by a managed property ServerRedirectedURL which needs to be included in the display template.
    Problem solved.
    Nehal Bhandari,ATL, Nagarro Softwares

Maybe you are looking for