Add custom property restrictions in advanced search web part

hi,
 I am having the default advanced search box web part in my ent.search center site collec. but as per my requirement i need to a  few items in the property restrictions dropdown in my advanced search web part.
is this possible in sp 2013 e.t serach center  site collection?
any help is  highly appreciated!

Hi,
Check this
http://technet.microsoft.com/en-us/library/ff621097.aspx
http://social.technet.microsoft.com/Forums/sharepoint/en-US/c25d418d-d4a2-47a3-9abe-c27656764843/how-to-add-custom-property-in-advanced-search-page?forum=sharepointgeneralprevious

Similar Messages

  • How to simply add custom property to a HTML Form Web Part?

    Hello.
    Is it possible to add a custom property (like a date-field) to a HTML Form Web Part with help of JavaScript? I do not want to use Visual Studio / Nappa etc. Is this possible in an easy way?
    Thanks for your help.

    Hi,
    Based on your description, my understanding is that you want to count the date between today and the latest event date.
    You can create a calendar in a page firstly, then add a content editor web part rather than the html form web part, as html form web part can't place the Jquery element.
    Then you can firstly read the date field value of the calendar list using JavaScript Client Object Model and then calculate the difference between two date values using Jquery. You can add the code directly in the content editor web part.
    Here are some detailed code demos for your reference:
    Get SharePoint calendar list field value using JavaScript Client Object Model:
    <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
    <script>
    $(document).ready(function(){
    SP.SOD.executeFunc("sp.js", "SP.ClientContext", retrieveListItemsCal);
    function retrieveListItemsCal() {
    var clientContextCal = new SP.ClientContext.get_current();
    var oListCal = clientContextCal.get_web().get_lists().getByTitle('Calendar');
    var camlQueryCal = new SP.CamlQuery.createAllItemsQuery();
    AllItemsCal = oListCal.getItems(camlQueryCal);
    clientContextCal.load(AllItemsCal);
    clientContextCal.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceededCal), Function.createDelegate(this, this.onQueryFailedCal));
    function onQuerySucceededCal(sender, args) {
    var listItemInfo = '';
    var listItemEnumeratorCal = AllItemsCal.getEnumerator();
    var htmlCal = '';
    while(listItemEnumeratorCal.moveNext()) {
    var oListItemCal = listItemEnumeratorCal.get_current();
    htmlcal= oListItemCal.get_item("Start Time").format("MMMM d, yyyy"));
    break;
    function onQueryFailedCal(sender, args) {
    alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
    </script>
    Calculate the difference between two dates:
    http://stackoverflow.com/questions/2609513/jquery-calculate-day-difference-in-2-date-textboxes
    Thanks
    Best Regards
    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].
    Jerry Guo
    TechNet Community Support

  • In Advanced Search Web Part , more than 5 properties filter cannot be added

    In SharePoint 2013  Advanced Search Web Part, Under Add Property restrictions, Maximum number of search filter (AND / OR)  is allowed is 5. How can I increase this count ?

    Hi,
    As I understand, you would like to have more than 5 property filter in Advanced Search web part.
    According to this article, it is one of the limitation in OOTB Advanced Search web part: "The property search doesn’t allow the users to specify more than 5 property filters." As workaround, "Reuse the OOTB Advanced Search UI’s hidden controls
    that determines the search attributes (ASB_PS_…)". Please refer more information via:
    http://blogs.msdn.com/b/senthilkumarmani/archive/2010/06/05/custom-advanced-search-metadata-values-pre-populated-for-user-selection.aspx
    Also, I find two articles about customizing the advanced search Webpart adding custom properties in case you need:
    http://vuppalasanthosh.blogspot.com/2013/03/customizing-advanced-search-webpart.html
    https://waelmohamed.wordpress.com/2011/05/31/add-custom-search-properties-in-your-advanced-search-sharepoint-2010/
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Advanced search web part issue

    hi,
     i am implementing a  advanced search web part , and in that  property restrictions, i have added  2  doument library columns [ not the site columns ]
    from my subsite in my site collection.
    but when i give some search keywords and perform   search, i am not able to get the search results in terms of documents/content.
    any extra settings do i need to do for performing advanced search
    1) Do i really need site columns to be created under the site collection , in order to be  searchable ?
    if i create a  simple document library column and cant i get it in the crawled properties section
    in the  central admin's search serv appln's  search schema section?
    pls advice

    As per my understanding you can crawl DL columns
    Can you get that document in search results page? Please check to see if the site which contains the library is included in content source.
    Could you please check site settings->Site Administration->Searchable columns, maybe the column is excluded?
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/b97a43b1-c727-4daa-a0d9-a18e53e09dd9/list-and-document-library-title-column-crawled-properties?forum=sharepointadminprevious
    Go to your Search Service Application in Central Administration.
        Click on Metadata Properties in the left navigation.
        Click on the Crawled Properties link.
        Click on the Categories link then select the SharePoint category
        Navigate the pages (next page arrow link) until you see ows_Title. Click on ows_Title.
        In the "Mappings to Metadata Properties" area of this page, ensure that the "Include values for this property in the search index" checkbox is checked, then Click OK. This checkbox is not checked by default.
        Repeat the same procedure above for your ows_Description crawled property to confirm that it is included in the index - which it should be by default.
        Start a Full Crawl 
    This will now include these crawled properties in the index and should now be available in the Managed Property which exposes them for Search.
    If this helped you resolve your issue, please mark it Answered

  • Issue in performing search using advanced search web part with any of these keywords.

    Hi,
    I am implementing advanced search web part, and i have added few columns [  these columns are doc lib columns and NOT site columns ],property restrictions dropdown.
    and when i  try to search for the documents,  contents from the subsites with the applied item from the property restrictions dropdown and with  "contains" keyword , and  filled-in the "any of these keywords"
    textbox,
    the search results  are not displayed , though there are multiple documents which has the keywords.
    am i missing any steps  here.? i have ensured that managed properties  were created and added in the properties.xml file in the adv.search web part's properties.

    hi Steve,
    thnx for the reply.
    here is my xml file details:
    <PropertyDef Name="DocComments" DataType="text" DisplayName="Comments"/>
        <PropertyDef Name="CreatedBy" DataType="text" DisplayName="Created By"/>
        <PropertyDef Name="ModifiedBy" DataType="text" DisplayName="Last Modified By"/>
        <PropertyDef Name="WellOWSTEXT" DataType="text" DisplayName="Well Name"/>
        <PropertyDef Name="BlockOWSTEXT" DataType="text" DisplayName="Block Name"/>
        <PropertyDef Name="ProjectOWSTEXT" DataType="text" DisplayName="Project Name"/>
        <PropertyDef Name="LocationOWSTEXT" DataType="text" DisplayName="Location"/>
        <PropertyDef Name="DisciplineOWSTEXT" DataType="text" DisplayName="Discipline"/>
      </PropertyDefs>
      <ResultTypes>
        <ResultType DisplayName="All Results" Name="default">
          <KeywordQuery/>
          <PropertyRef Name="Author" />
          <PropertyRef Name="Description" />
          <PropertyRef Name="FileName" />
          <PropertyRef Name="Size" />
          <PropertyRef Name="Path" />
          <PropertyRef Name="Write" />
          <PropertyRef Name="CreatedBy" />
          <PropertyRef Name="ModifiedBy" />
          <PropertyRef Name="WellOWSTEXT" />
          <PropertyRef Name="BlockOWSTEXT" />
          <PropertyRef Name="ProjectOWSTEXT" />
          <PropertyRef Name="LocationOWSTEXT" />
          <PropertyRef Name="DisciplineOWSTEXT" />
        </ResultType>
      </ResultTypes>
    </root>
    am using the managedproperties without spaces. the problem is that, when i give  the word/words
    in the "any of these words" textbox and  if i give a value with the "contains" dropdown 
    its not allwoing me give proper results.
    After adding these property restrictions i have done the full crawl again.
    @Steven Adnrews: i have done the full crawl, multiple times. Though these columns are NOT created as site columns, it came as managed properties in my Srch Serv.Appln, search schema page.
    @Fabian: i am not getting your point.Can you pls tell,where will I see the xsl. i  think, the xsl editor and xsl configuration has been replaced by html display templates in SP 2013 Search.

  • How to create Image as Custom Property Type used in Configurable Web Part?

    I wanted to create custom configurable web part property for Image.
    Example - the screenshot of Image property used in Image web part is shown below:
    My goal is to create as many images as possible in custom configurable web part.
    I tried to write the code:
    [WebBrowsable(true),
    WebDisplayName("Example Photo"),
    WebDescription("Example Photo of the user"),
    Category("Custom User Profile"),
    Personalizable(PersonalizationScope.Shared)]
    public Image ExampleUserPhoto { get; set; }
    However, the result does not display Image configurable web part property.
    I wonder why the data type Image does not cause the custom web part to have Image configurable web part property.
    Other data types such as Boolean, Enum, Integer, String and DateTime can be used.
    How can I create Image as Custom Property Type used in Configurable Web Part?

    I have examined that context node __00 has been enhanced,and  has a class name  z___00. But  when I created a new attirubute by right click " Attributes" with wizard under context node __00.There is still  a error message "view is not enhaced or copied with wizard".
    But  when  I created a method  "getvaliation "  in the class of context node zcl__00, the attribute  'valiation' automatically created(at the same time the method "getvaliation' automatically  created for the attribute 'valiation') and I need not to create attibute 'validation' by wizard .  It seemed as if the problem is resloved. But when I make test for it in web ui .There is a runtime erro message.
    Do I need to make some configurations in  the business object layer  for the checkbox? but  the checkbox is only used as a flag  to decide whether a backgoud job is needed to be executed.
    Edited by: samhuman on Jun 22, 2010 10:31 AM

  • Advanced Search Web Part in SharePoint 2013

    I would like to know more about advance search web part in SharePoint 2013. How it looks and implementation ?

    Hi,
    Please go through below video/links for more details on SharePoint 2013 Search and associated feature.
    http://www.youtube.com/watch?v=T1J_pMD7V_4
    https://social.technet.microsoft.com/forums/sharepoint/en-US/99e6d5f2-76da-4fdd-8464-24159f12cee1/advanced-search-box-web-part-is-missing
    Hope this helps you.
    Regards
    Soni K

  • Advanced Search Web Part

    Hi Everyone,
    Does anyone know where I can find the Advanced Search web part in 2013? I have used this web part many times in SharePoint 2007 and 2010 but can't seem to find it in 2013. Did Microsoft remove or rename it? Any help would be greatly appreciated.
    Thanks,
    Dan
    Dan Marth

    Hi,
    According to your description, you could not find advanced search web part in SharePoint 2013.
    For SharePoint 2010, the advanced search web part is in the default page of Search Center.
    For SharePoint 2013, the advanced search web part is at the bottom of the search result page.
    You may need to search something firstly and then you can see the Advanced Search Option at the bottom of the page.
    Feel free to reply if there are still any questions.
    Best regards
    Wendy Li
    TechNet Community Support

  • 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

  • How do I add a search web part to search ONLY a subsite?

    I'm trying to add a search web part into a subsite that will search ONLY that specific subsite for documents. Not the entire site collection or anything else.   Everything I've looked at doesn't address this specifically.  I want a user
    to be able to type in a word like "SharePoint"  and all it displays is the results for any document in that subsite that has "SharePoint" in the title of the document.   I'm assuming that it's not very convoluted to do.

    You can use site "search settings" and "search scope" to achieve this , you can use any of these method -
    Configure Site settings -> Search settings to default to the contexual scope. This will pass current site  url to search results page to filter current site result only.
    Use refinement web part on the search results page to filter results from a specific sub-site.
    Create a search scope for the subsite , some example here for Sp2010 and 2013-
    http://www.bentedder.com/create-a-search-scope-for-a-sharepoint-2010-list-or-library/
    http://techmikael.blogspot.in/2013/04/limiting-search-results-in-sharepoint.html
    Thanks
    Ganesh Jat [My Blog |
    LinkedIn | Twitter ]
    Please click 'Mark As Answer' if a post solves your problem or 'Vote As Helpful' if it was useful.

  • Sharepoint 2013 :Content Search Web part Property Filter By Query String - How to use ?

    Hi,
    I would like to filter data that is displayed in content search web part  by using  URL.
    I tried to use Value of a parameter from a URL - Query String.Parameter1
    But have no idea how to use it.
    Can someone help me pleas ?

    duplicate thread
    http://social.msdn.microsoft.com/Forums/en-US/f9fef155-1aa3-43b5-b285-5eae5d036b8d/content-search-webpart-property-filter-by-query-string-how-to-use-?forum=sharepointgeneral
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

  • 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?

  • How to code a custom content search web part in Sharepoint 2013?

    Hi,
    Do you have any idea on how to create a custom Content Search Web part? What I mean is, I will code it in Visual Studio 2012.
    Regards,
    Napster

    check this
    http://social.technet.microsoft.com/Forums/ie/en-US/13f1e581-4250-48c7-93a6-ef7ae2bb14c5/is-this-there-a-way-to-programmatically-set-the-query-text-or-append-additional-kql-filtering-to-a?forum=sharepointsearch
    http://onlinecoder.blogspot.in/2013/08/sharepoint-2013-content-search-web-part.html

  • Content Search Web Part - Result Preview Says "Invalid Request"

    This behavior seems to be occurring in both our test and production farms.
    ULS logs indicate the following entry:
    Exception occured in scope Microsoft.Office.Server.Search.Query.SearchExecutor.ExecuteQueries. Exception=Microsoft.SharePoint.Client.InvalidClientQueryException: Invalid request.
    at Microsoft.SharePoint.Client.DataConverter.GetObject[T](XmlNode node, ProxyContext proxyContext)
    at Microsoft.SharePoint.Client.DataConverter.GetObjectArray[T](XmlNode node, ProxyContext proxyContext)
    at Microsoft.Office.Server.Search.Query.SearchExecutorServerStub.ExecuteQueries_MethodProxy(SearchExecutor target, XmlNodeList xmlargs, ProxyContext proxyContext)
    at Microsoft.Office.Server.Search.Query.SearchExecutorServerStub.InvokeMethod(Object target, String methodName, XmlNodeList xmlargs, ProxyContext proxyContext, Boolean& isVoid)
    at Microsoft.SharePoint.Client.ServerStub.InvokeMethodWithMonitoredScope(Object target, String methodName, XmlNodeList args, ProxyContext proxyContext, Boolean& isVoid)
    I have used very simple queries, to see if it's KQL error on our part, such as ContentType:"CType Name"
    When we use developer dashboard I can see the XML for the search request which the CSOM is dispatching however, I believe this to be completely out of the box.
    Do you have any suggestions as to why the request may be considered invalid and what diagnostics could be run to better isolate why this OOB feature is not working?
    We are using Enterprise SP2013 On Prem.
    thanks

    Aries,
    Here is a description of what I see.
    1) This is the out of the box (non-customized) CSWP
    2) Upon clicking the "Change Query" button on the toolpart the dialog window opens.  The Search Result Preview says "This query returned no results" but as per the JSON response above, it appears that there is "ResultTables" present in the response.
    Occasionally, a preview-result does show up but this is not consistent.  The JSON response seems to be identical.
    Initial response - shows "Query returned no results" however, I see results in the JSON below. I have replaced our hostname w/ intranet.contoso.com
    "SchemaVersion":"15.0.0.0","LibraryVersion":"15.0.4505.1001","ErrorInfo":null,"TraceCorrelationId":"24f57a9c-28de-4074-debb-1340df16b8ab"
    },1,{
    "IsNull":false
    },4,{
    "IsNull":false
    },12,{
    "IsNull":false
    },16,{
    "IsNull":false
    },24,{
    "IsNull":false
    },38,{
    "IsNull":false
    },43,{
    "c856bd07-9a44-4bf4-a32c-e049d1d03390Default":{
    "_ObjectType_":"Microsoft.SharePoint.Client.Search.Query.ResultTableCollection","ElapsedTime":62,"Properties":{
    "RowLimit":10,"SourceId":"\/Guid(8413cd39-2156-4e00-b54d-11efd9abdb89)\/","EnableStacking":true,"piPageImpression":"327337_1754_1033","SerializedQuery":"<Query Culture=\"en-US\" EnableStemming=\"True\" EnablePhonetic=\"False\" EnableNicknames=\"False\" IgnoreAllNoiseQuery=\"True\" SummaryLength=\"180\" MaxSnippetLength=\"180\" DesiredSnippetLength=\"90\" KeywordInclusion=\"0\" QueryText=\"\" QueryTemplate=\"ContentType:&quot;Custom Announcement&quot; path:&quot;http:\u002f\u002fintranet.contoso.com\u002fnews&quot;\" TrimDuplicates=\"False\" Site=\"566718d5-1e74-453c-ac54-6e636def6f91\" Web=\"83df59b4-8cac-48f4-81b3-c3b95cfacc0b\" KeywordType=\"True\" HiddenConstraints=\"\" \u002f>"
    },"QueryErrors":null,"QueryId":"1060b39a-2f92-4313-b192-4c9badd15812","SpellingSuggestion":"","TriggeredRules":[
    ],"ResultTables":[
    "_ObjectType_":"Microsoft.SharePoint.Client.Search.Query.ResultTable","GroupTemplateId":null,"ItemTemplateId":null,"Properties":{
    "GenerationId":9223372036854775806,"ExecutionTimeMs":31,"QueryModification":"ContentType:\"Custom Announcement\" path:\"http:\u002f\u002fintranet.contoso.com\u002fnews\" -ContentClass=urn:content-class:SPSPeople","RenderTemplateId":"~sitecollection\u002f_catalogs\u002fmasterpage\u002fDisplay Templates\u002fSearch\u002fGroup_Default.js","StartRecord":0,"piPageImpressionBlockType":2
    },"QueryId":"1060b39a-2f92-4313-b192-4c9badd15812","QueryRuleId":"00000000-0000-0000-0000-000000000000","ResultRows":[
    "Rank":0,"DocId":1348,"Path":"http:\u002f\u002fintranet.contoso.com\u002fnews\u002fPages\u002fU-S--employees.aspx","Title":"U.S. employees: March 15th deadline for 2013 Health Care Flexible Spending Account (FSA)","OriginalPath":"http:\u002f\u002fintranet.contoso.com\u002fnews\u002fPages\u002fU-S--employees.aspx","FileType":"html","SecondaryFileExtension":"aspx","Author":"Dennis Lanthier","Size":100366,"Description":null,"EditorOWSUSER":"[email protected] | Dennis Lanthier | 693A30232E777C7463706C5C64656E6E69735F6C616E7468696572 i:0#.w|tcpl\\dennis_lanthier","LastModifiedTime":"\/Date(1394039237000)\/","CollapsingStatus":0,"HitHighlightedSummary":null,"HitHighlightedProperties":null,"FileExtension":"aspx","ViewsLifeTime":null,"ParentLink":"http:\u002f\u002fintranet.contoso.com\u002fnews\u002fPages\u002fForms\u002fAllItems.aspx","ViewsRecent":null,"IsContainer":false,"DisplayAuthor":"Dennis Lanthier","docaclmeta":null,"ResultTypeIdList":"16","PartitionId":"\/Guid(0c37852b-34d0-418e-91c6-2ac25af4be5b)\/","UrlZone":0,"AAMEnabledManagedProperties":"AttachmentURI;deeplinks;DefaultEncodingURL;ExternalMediaURL;HierarchyUrl;OrgParentUrls;OrgUrls;OriginalPath;ParentLink;Path;PictureThumbnailURL;PictureURL;PublishingImage;recommendedfor;ServerRedirectedEmbedURL;ServerRedirectedPreviewURL;ServerRedirectedURL;SiteLogo;SitePath;SPSiteURL;UserEncodingURL","ResultTypeId":16,"RenderTemplateId":"~sitecollection\u002f_catalogs\u002fmasterpage\u002fDisplay Templates\u002fSearch\u002fItem_WebPage.js","piSearchResultId":"0_1","QueryRuleId":"\/Guid(00000000-0000-0000-0000-000000000000)\/"
    "Rank":0,"DocId":1392,"Path":"http:\u002f\u002fintranet.contoso.com\u002fnews\u002fPages\u002fCelebrate-International-Women\u2019s-Day-on-Thurs--Mar--6.aspx","Title":"Celebrate International Women\u2019s Day on Thursday, March 6th ","OriginalPath":"http:\u002f\u002fintranet.contoso.com\u002fnews\u002fPages\u002fCelebrate-International-Women\u2019s-Day-on-Thurs--Mar--6.aspx","FileType":"html","SecondaryFileExtension":"aspx","Author":"Cassie Dubetz;Jennifer Torres","Size":103770,"Description":null,"EditorOWSUSER":"[email protected] | Jennifer Torres | 693A30232E777C7463706C5C6A656E6E696665725F746F72726573 i:0#.w|tcpl\\jennifer_torres","LastModifiedTime":"\/Date(1394070849000)\/","CollapsingStatus":0,"HitHighlightedSummary":null,"HitHighlightedProperties":null,"FileExtension":"aspx","ViewsLifeTime":null,"ParentLink":"http:\u002f\u002fintranet.contoso.com\u002fnews\u002fPages\u002fForms\u002fAllItems.aspx","ViewsRecent":null,"IsContainer":false,"DisplayAuthor":"Cassie Dubetz;Jennifer Torres","docaclmeta":null,"ResultTypeIdList":"16","PartitionId":"\/Guid(0c37852b-34d0-418e-91c6-2ac25af4be5b)\/","UrlZone":0,"AAMEnabledManagedProperties":"AttachmentURI;deeplinks;DefaultEncodingURL;ExternalMediaURL;HierarchyUrl;OrgParentUrls;OrgUrls;OriginalPath;ParentLink;Path;PictureThumbnailURL;PictureURL;PublishingImage;recommendedfor;ServerRedirectedEmbedURL;ServerRedirectedPreviewURL;ServerRedirectedURL;SiteLogo;SitePath;SPSiteURL;UserEncodingURL","ResultTypeId":16,"RenderTemplateId":"~sitecollection\u002f_catalogs\u002fmasterpage\u002fDisplay Templates\u002fSearch\u002fItem_WebPage.js","piSearchResultId":"1_1","QueryRuleId":"\/Guid(00000000-0000-0000-0000-000000000000)\/"
    ContentType:"Custom Announcement" path:"http://intranet.contoso.com/news"
    This is the  KQL. (above)
    Next, we immediately click "Test query" without modifying the KQL. We send an XML request using the web part however, in that case, the XML variables are replaced with the $-syntax, this occurred within the web part through no effort of ours.  The behavior
    shows "Invalid Request"
    Can you explain what you mean by "There is customization in the web part"?  We have used the out of the box web part.
    Any subsequent query modification in the query-builder dialog-window causes the $-syntax.  When i illustrated the comparisons of the XML-request above the only difference in between the two requests is that the left-side is created by the initial-load
    of the QueryBuilder dialog and the right-side is created when we click "Test query" (immediately after) in the Advanced Mode screen.
    We do have a custom master page and I will try to revert back as close as possible to vanilla SharePoint and test.  But to address your earlier point, no customization to the Content By Search Web part has been used.
    Here is the full initial valid request
    <Request xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009" SchemaVersion="15.0.0.0" LibraryVersion="15.0.0.0" ApplicationName="Javascript Library">
    <Actions>
    <ObjectPath Id="1" ObjectPathId="0" />
    <SetProperty Id="2" ObjectPathId="0" Name="QueryTemplate">
    <Parameter Type="String">ContentType:"Custom Announcement" path:"http://intranet.contoso.com/news"</Parameter>
    </SetProperty>
    <ObjectPath Id="4" ObjectPathId="3" />
    <Method Name="Add" Id="5" ObjectPathId="3">
    <Parameters>
    <Parameter Type="String">NewsPublishingDate</Parameter>
    <Parameter Type="Number">1</Parameter>
    </Parameters>
    </Method>
    <SetProperty Id="6" ObjectPathId="0" Name="RowsPerPage">
    <Parameter Type="Number">10</Parameter>
    </SetProperty>
    <SetProperty Id="7" ObjectPathId="0" Name="RowLimit">
    <Parameter Type="Number">10</Parameter>
    </SetProperty>
    <SetProperty Id="8" ObjectPathId="0" Name="TotalRowsExactMinimum">
    <Parameter Type="Number">11</Parameter>
    </SetProperty>
    <SetProperty Id="9" ObjectPathId="0" Name="SourceId">
    <Parameter Type="Guid">{8413cd39-2156-4e00-b54d-11efd9abdb89}</Parameter>
    </SetProperty>
    <SetProperty Id="10" ObjectPathId="0" Name="Refiners">
    <Parameter Type="String">BaseOfficeLocation(filter=7/0/*),CombinedUserProfileNames(filter=7/0/*),companies(filter=7/0/*),contentclass(filter=7/0/*),ContentType(filter=7/0/*),ContentTypeId(filter=7/0/*),Department(filter=7/0/*),DisplayAuthor(filter=7/0/*),DMSDocAuthor(filter=7/0/*),FileExtension(filter=7/0/*),FileType(filter=7/0/*),HostingPartition(filter=7/0/*),JobTitle(filter=7/0/*),languages(filter=7/0/*),Location(filter=7/0/*),ManagedProperties(filter=7/0/*),NewsExternalNewsSource(filter=7/0/*),owsmetadatafacetinfo(filter=7/0/*),owstaxidmetadataalltagsinfo(filter=7/0/*),owstaxIdProductCatalogItemCategory(filter=7/0/L*),People(filter=7/0/*),PeopleInMedia(filter=7/0/*),PeopleKeywords(filter=7/0/*),PostAuthor(filter=7/0/*),RefinableString00(filter=7/0/*),RefinableString01(filter=7/0/*),RefinableString02(filter=7/0/*),RefinableString03(filter=7/0/*),RefinableString04(filter=7/0/*),RefinableString05(filter=7/0/*),RefinableString06(filter=7/0/*),RefinableString07(filter=7/0/*),RefinableString08(filter=7/0/*),RefinableString09(filter=7/0/*),RefinableString10(filter=7/0/*),RefinableString11(filter=7/0/*),RefinableString12(filter=7/0/*),RefinableString13(filter=7/0/*),RefinableString14(filter=7/0/*),RefinableString15(filter=7/0/*),RefinableString16(filter=7/0/*),RefinableString17(filter=7/0/*),RefinableString18(filter=7/0/*),RefinableString19(filter=7/0/*),RefinableString20(filter=7/0/*),RefinableString21(filter=7/0/*),RefinableString22(filter=7/0/*),RefinableString23(filter=7/0/*),RefinableString24(filter=7/0/*),RefinableString25(filter=7/0/*),RefinableString26(filter=7/0/*),RefinableString27(filter=7/0/*),RefinableString28(filter=7/0/*),RefinableString29(filter=7/0/*),RefinableString30(filter=7/0/*),RefinableString31(filter=7/0/*),RefinableString32(filter=7/0/*),RefinableString33(filter=7/0/*),RefinableString34(filter=7/0/*),RefinableString35(filter=7/0/*),RefinableString36(filter=7/0/*),RefinableString37(filter=7/0/*),RefinableString38(filter=7/0/*),RefinableString39(filter=7/0/*),RefinableString40(filter=7/0/*),RefinableString41(filter=7/0/*),RefinableString42(filter=7/0/*),RefinableString43(filter=7/0/*),RefinableString44(filter=7/0/*),RefinableString45(filter=7/0/*),RefinableString46(filter=7/0/*),RefinableString47(filter=7/0/*),RefinableString48(filter=7/0/*),RefinableString49(filter=7/0/*),RefinableString50(filter=7/0/*),RefinableString51(filter=7/0/*),RefinableString52(filter=7/0/*),RefinableString53(filter=7/0/*),RefinableString54(filter=7/0/*),RefinableString55(filter=7/0/*),RefinableString56(filter=7/0/*),RefinableString57(filter=7/0/*),RefinableString58(filter=7/0/*),RefinableString59(filter=7/0/*),RefinableString60(filter=7/0/*),RefinableString61(filter=7/0/*),RefinableString62(filter=7/0/*),RefinableString63(filter=7/0/*),RefinableString64(filter=7/0/*),RefinableString65(filter=7/0/*),RefinableString66(filter=7/0/*),RefinableString67(filter=7/0/*),RefinableString68(filter=7/0/*),RefinableString69(filter=7/0/*),RefinableString70(filter=7/0/*),RefinableString71(filter=7/0/*),RefinableString72(filter=7/0/*),RefinableString73(filter=7/0/*),RefinableString74(filter=7/0/*),RefinableString75(filter=7/0/*),RefinableString76(filter=7/0/*),RefinableString77(filter=7/0/*),RefinableString78(filter=7/0/*),RefinableString79(filter=7/0/*),RefinableString80(filter=7/0/*),RefinableString81(filter=7/0/*),RefinableString82(filter=7/0/*),RefinableString83(filter=7/0/*),RefinableString84(filter=7/0/*),RefinableString85(filter=7/0/*),RefinableString86(filter=7/0/*),RefinableString87(filter=7/0/*),RefinableString88(filter=7/0/*),RefinableString89(filter=7/0/*),RefinableString90(filter=7/0/*),RefinableString91(filter=7/0/*),RefinableString92(filter=7/0/*),RefinableString93(filter=7/0/*),RefinableString94(filter=7/0/*),RefinableString95(filter=7/0/*),RefinableString96(filter=7/0/*),RefinableString97(filter=7/0/*),RefinableString98(filter=7/0/*),RefinableString99(filter=7/0/*),Responsibilities(filter=7/0/*),SharedWithInternal(filter=7/0/*),Site(filter=7/0/*),SPContentType(filter=7/0/*),SPSiteURL(filter=7/0/*),Tags(filter=7/0/*),UsageEventItemId(filter=7/0/*),WebTemplate(filter=7/0/*),WordCustomRefiner1(filter=7/0/*),WordCustomRefiner2(filter=7/0/*),WordCustomRefiner3(filter=7/0/*),WordCustomRefiner4(filter=7/0/*),WordCustomRefiner5(filter=7/0/*),WordExactCustomRefiner(filter=7/0/*),WordPartCustomRefiner1(filter=7/0/*),WordPartCustomRefiner2(filter=7/0/*),WordPartCustomRefiner3(filter=7/0/*),WordPartCustomRefiner4(filter=7/0/*),WordPartCustomRefiner5(filter=7/0/*),WordPartExactCustomRefiner(filter=7/0/*)</Parameter>
    </SetProperty>
    <ObjectPath Id="12" ObjectPathId="11" />
    <Method Name="Add" Id="13" ObjectPathId="11">
    <Parameters>
    <Parameter Type="String">Path</Parameter>
    </Parameters>
    </Method>
    <Method Name="Add" Id="14" ObjectPathId="11">
    <Parameters>
    <Parameter Type="String">Title</Parameter>
    </Parameters>
    </Method>
    <ObjectPath Id="16" ObjectPathId="15" />
    <Method Name="Add" Id="17" ObjectPathId="15">
    <Parameters>
    <Parameter Type="String">Title</Parameter>
    </Parameters>
    </Method>
    <Method Name="Add" Id="18" ObjectPathId="15">
    <Parameters>
    <Parameter Type="String">Path</Parameter>
    </Parameters>
    </Method>
    <Method Name="Add" Id="19" ObjectPathId="15">
    <Parameters>
    <Parameter Type="String">Author</Parameter>
    </Parameters>
    </Method>
    <Method Name="Add" Id="20" ObjectPathId="15">
    <Parameters>
    <Parameter Type="String">SectionNames</Parameter>
    </Parameters>
    </Method>
    <Method Name="Add" Id="21" ObjectPathId="15">
    <Parameters>
    <Parameter Type="String">SiteDescription</Parameter>
    </Parameters>
    </Method>
    <SetProperty Id="22" ObjectPathId="0" Name="TrimDuplicates">
    <Parameter Type="Boolean">false</Parameter>
    </SetProperty>
    <ObjectPath Id="24" ObjectPathId="23" />
    <Method Name="SetQueryPropertyValue" Id="25" ObjectPathId="23">
    <Parameters>
    <Parameter Type="String">FillIn</Parameter>
    <Parameter TypeId="{b25ba502-71d7-4ae4-a701-4ca2fb1223be}">
    <Property Name="BoolVal" Type="Boolean">false</Property>
    <Property Name="IntVal" Type="Number">0</Property>
    <Property Name="QueryPropertyValueTypeIndex" Type="Number">1</Property>
    <Property Name="StrArray" Type="Null" />
    <Property Name="StrVal" Type="String">false</Property>
    </Parameter>
    </Parameters>
    </Method>
    <Method Name="SetQueryPropertyValue" Id="26" ObjectPathId="23">
    <Parameters>
    <Parameter Type="String">EnableStacking</Parameter>
    <Parameter TypeId="{b25ba502-71d7-4ae4-a701-4ca2fb1223be}">
    <Property Name="BoolVal" Type="Boolean">true</Property>
    <Property Name="IntVal" Type="Number">0</Property>
    <Property Name="QueryPropertyValueTypeIndex" Type="Number">3</Property>
    <Property Name="StrArray" Type="Null" />
    <Property Name="StrVal" Type="Null" />
    </Parameter>
    </Parameters>
    </Method>
    <Method Name="SetQueryPropertyValue" Id="27" ObjectPathId="23">
    <Parameters>
    <Parameter Type="String">TryCache</Parameter>
    <Parameter TypeId="{b25ba502-71d7-4ae4-a701-4ca2fb1223be}">
    <Property Name="BoolVal" Type="Boolean">true</Property>
    <Property Name="IntVal" Type="Number">0</Property>
    <Property Name="QueryPropertyValueTypeIndex" Type="Number">3</Property>
    <Property Name="StrArray" Type="Null" />
    <Property Name="StrVal" Type="Null" />
    </Parameter>
    </Parameters>
    </Method>
    <Method Name="SetQueryPropertyValue" Id="28" ObjectPathId="23">
    <Parameters>
    <Parameter Type="String">ListId</Parameter>
    <Parameter TypeId="{b25ba502-71d7-4ae4-a701-4ca2fb1223be}">
    <Property Name="BoolVal" Type="Boolean">false</Property>
    <Property Name="IntVal" Type="Number">0</Property>
    <Property Name="QueryPropertyValueTypeIndex" Type="Number">1</Property>
    <Property Name="StrArray" Type="Null" />
    <Property Name="StrVal" Type="String">b9b9c3b8-92d8-4850-a3b3-fc2544b9c6c0</Property>
    </Parameter>
    </Parameters>
    </Method>
    <Method Name="SetQueryPropertyValue" Id="29" ObjectPathId="23">
    <Parameters>
    <Parameter Type="String">ListItemId</Parameter>
    <Parameter TypeId="{b25ba502-71d7-4ae4-a701-4ca2fb1223be}">
    <Property Name="BoolVal" Type="Boolean">false</Property>
    <Property Name="IntVal" Type="Number">27</Property>
    <Property Name="QueryPropertyValueTypeIndex" Type="Number">2</Property>
    <Property Name="StrArray" Type="Null" />
    <Property Name="StrVal" Type="Null" />
    </Parameter>
    </Parameters>
    </Method>
    <Method Name="SetQueryPropertyValue" Id="30" ObjectPathId="23">
    <Parameters>
    <Parameter Type="String">OverrideExpandedTokens</Parameter>
    <Parameter TypeId="{b25ba502-71d7-4ae4-a701-4ca2fb1223be}">
    <Property Name="BoolVal" Type="Boolean">true</Property>
    <Property Name="IntVal" Type="Number">0</Property>
    <Property Name="QueryPropertyValueTypeIndex" Type="Number">3</Property>
    <Property Name="StrArray" Type="Null" />
    <Property Name="StrVal" Type="Null" />
    </Parameter>
    </Parameters>
    </Method>
    <SetProperty Id="31" ObjectPathId="0" Name="ResultsUrl">
    <Parameter Type="String">/news/Pages/Announcements.aspx</Parameter>
    </SetProperty>
    <SetProperty Id="32" ObjectPathId="0" Name="ClientType">
    <Parameter Type="String">SearchWebPartConfiguration</Parameter>
    </SetProperty>
    <SetProperty Id="33" ObjectPathId="0" Name="EnableInterleaving">
    <Parameter Type="Boolean">false</Parameter>
    </SetProperty>
    <Method Name="SetQueryPropertyValue" Id="34" ObjectPathId="23">
    <Parameters>
    <Parameter Type="String">QuerySession</Parameter>
    <Parameter TypeId="{b25ba502-71d7-4ae4-a701-4ca2fb1223be}">
    <Property Name="BoolVal" Type="Boolean">false</Property>
    <Property Name="IntVal" Type="Number">0</Property>
    <Property Name="QueryPropertyValueTypeIndex" Type="Number">1</Property>
    <Property Name="StrArray" Type="Null" />
    <Property Name="StrVal" Type="String">a5fa2e59-91c1-472e-a63d-d99d2fbf8fd0</Property>
    </Parameter>
    </Parameters>
    </Method>
    <SetProperty Id="35" ObjectPathId="0" Name="SafeQueryPropertiesTemplateUrl">
    <Parameter Type="String">sitesearch://webroot</Parameter>
    </SetProperty>
    <SetProperty Id="36" ObjectPathId="0" Name="IgnoreSafeQueryPropertiesTemplateUrl">
    <Parameter Type="Boolean">false</Parameter>
    </SetProperty>
    <ObjectPath Id="38" ObjectPathId="37" />
    <ExceptionHandlingScope Id="39">
    <TryScope Id="41">
    <Method Name="ExecuteQueries" Id="43" ObjectPathId="37">
    <Parameters>
    <Parameter Type="Array">
    <Object Type="String">ca9bfc32-2337-47bb-b973-800509d8efecDefault</Object>
    </Parameter>
    <Parameter Type="Array">
    <Object ObjectPathId="0" />
    </Parameter>
    <Parameter Type="Boolean">true</Parameter>
    </Parameters>
    </Method>
    </TryScope>
    <CatchScope Id="45" />
    </ExceptionHandlingScope>
    </Actions>
    <ObjectPaths>
    <Constructor Id="0" TypeId="{80173281-fffd-47b6-9a49-312e06ff8428}" />
    <Property Id="3" ParentId="0" Name="SortList" />
    <Property Id="11" ParentId="0" Name="SelectProperties" />
    <Property Id="15" ParentId="0" Name="HitHighlightedProperties" />
    <Property Id="23" ParentId="0" Name="Properties" />
    <Constructor Id="37" TypeId="{8d2ac302-db2f-46fe-9015-872b35f15098}" />
    </ObjectPaths>
    </Request>
    Here is the full invalid-request which is created with the TestQuery button
    <Request xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009" SchemaVersion="15.0.0.0" LibraryVersion="15.0.0.0" ApplicationName="Javascript Library">
    <Actions>
    <ObjectPath Id="1" ObjectPathId="0" />
    <SetProperty Id="2" ObjectPathId="0" Name="QueryTemplate">
    <Parameter Type="String">ContentType:"Custom Announcement" path:"http://intranet.contoso.com/news"</Parameter>
    </SetProperty>
    <ObjectPath Id="4" ObjectPathId="3" />
    <Method Name="Add" Id="5" ObjectPathId="3">
    <Parameters>
    <Parameter Type="String">NewsPublishingDate</Parameter>
    <Parameter Type="Number">1</Parameter>
    </Parameters>
    </Method>
    <SetProperty Id="6" ObjectPathId="0" Name="RowsPerPage">
    <Parameter Type="Number">10</Parameter>
    </SetProperty>
    <SetProperty Id="7" ObjectPathId="0" Name="RowLimit">
    <Parameter Type="Number">10</Parameter>
    </SetProperty>
    <SetProperty Id="8" ObjectPathId="0" Name="TotalRowsExactMinimum">
    <Parameter Type="Number">11</Parameter>
    </SetProperty>
    <SetProperty Id="9" ObjectPathId="0" Name="SourceId">
    <Parameter Type="Guid">{8413cd39-2156-4e00-b54d-11efd9abdb89}</Parameter>
    </SetProperty>
    <SetProperty Id="10" ObjectPathId="0" Name="Refiners">
    <Parameter Type="String">BaseOfficeLocation(filter=7/0/*),CombinedUserProfileNames(filter=7/0/*),companies(filter=7/0/*),contentclass(filter=7/0/*),ContentType(filter=7/0/*),ContentTypeId(filter=7/0/*),Department(filter=7/0/*),DisplayAuthor(filter=7/0/*),DMSDocAuthor(filter=7/0/*),FileExtension(filter=7/0/*),FileType(filter=7/0/*),HostingPartition(filter=7/0/*),JobTitle(filter=7/0/*),languages(filter=7/0/*),Location(filter=7/0/*),ManagedProperties(filter=7/0/*),NewsExternalNewsSource(filter=7/0/*),owsmetadatafacetinfo(filter=7/0/*),owstaxidmetadataalltagsinfo(filter=7/0/*),owstaxIdProductCatalogItemCategory(filter=7/0/L*),People(filter=7/0/*),PeopleInMedia(filter=7/0/*),PeopleKeywords(filter=7/0/*),PostAuthor(filter=7/0/*),RefinableString00(filter=7/0/*),RefinableString01(filter=7/0/*),RefinableString02(filter=7/0/*),RefinableString03(filter=7/0/*),RefinableString04(filter=7/0/*),RefinableString05(filter=7/0/*),RefinableString06(filter=7/0/*),RefinableString07(filter=7/0/*),RefinableString08(filter=7/0/*),RefinableString09(filter=7/0/*),RefinableString10(filter=7/0/*),RefinableString11(filter=7/0/*),RefinableString12(filter=7/0/*),RefinableString13(filter=7/0/*),RefinableString14(filter=7/0/*),RefinableString15(filter=7/0/*),RefinableString16(filter=7/0/*),RefinableString17(filter=7/0/*),RefinableString18(filter=7/0/*),RefinableString19(filter=7/0/*),RefinableString20(filter=7/0/*),RefinableString21(filter=7/0/*),RefinableString22(filter=7/0/*),RefinableString23(filter=7/0/*),RefinableString24(filter=7/0/*),RefinableString25(filter=7/0/*),RefinableString26(filter=7/0/*),RefinableString27(filter=7/0/*),RefinableString28(filter=7/0/*),RefinableString29(filter=7/0/*),RefinableString30(filter=7/0/*),RefinableString31(filter=7/0/*),RefinableString32(filter=7/0/*),RefinableString33(filter=7/0/*),RefinableString34(filter=7/0/*),RefinableString35(filter=7/0/*),RefinableString36(filter=7/0/*),RefinableString37(filter=7/0/*),RefinableString38(filter=7/0/*),RefinableString39(filter=7/0/*),RefinableString40(filter=7/0/*),RefinableString41(filter=7/0/*),RefinableString42(filter=7/0/*),RefinableString43(filter=7/0/*),RefinableString44(filter=7/0/*),RefinableString45(filter=7/0/*),RefinableString46(filter=7/0/*),RefinableString47(filter=7/0/*),RefinableString48(filter=7/0/*),RefinableString49(filter=7/0/*),RefinableString50(filter=7/0/*),RefinableString51(filter=7/0/*),RefinableString52(filter=7/0/*),RefinableString53(filter=7/0/*),RefinableString54(filter=7/0/*),RefinableString55(filter=7/0/*),RefinableString56(filter=7/0/*),RefinableString57(filter=7/0/*),RefinableString58(filter=7/0/*),RefinableString59(filter=7/0/*),RefinableString60(filter=7/0/*),RefinableString61(filter=7/0/*),RefinableString62(filter=7/0/*),RefinableString63(filter=7/0/*),RefinableString64(filter=7/0/*),RefinableString65(filter=7/0/*),RefinableString66(filter=7/0/*),RefinableString67(filter=7/0/*),RefinableString68(filter=7/0/*),RefinableString69(filter=7/0/*),RefinableString70(filter=7/0/*),RefinableString71(filter=7/0/*),RefinableString72(filter=7/0/*),RefinableString73(filter=7/0/*),RefinableString74(filter=7/0/*),RefinableString75(filter=7/0/*),RefinableString76(filter=7/0/*),RefinableString77(filter=7/0/*),RefinableString78(filter=7/0/*),RefinableString79(filter=7/0/*),RefinableString80(filter=7/0/*),RefinableString81(filter=7/0/*),RefinableString82(filter=7/0/*),RefinableString83(filter=7/0/*),RefinableString84(filter=7/0/*),RefinableString85(filter=7/0/*),RefinableString86(filter=7/0/*),RefinableString87(filter=7/0/*),RefinableString88(filter=7/0/*),RefinableString89(filter=7/0/*),RefinableString90(filter=7/0/*),RefinableString91(filter=7/0/*),RefinableString92(filter=7/0/*),RefinableString93(filter=7/0/*),RefinableString94(filter=7/0/*),RefinableString95(filter=7/0/*),RefinableString96(filter=7/0/*),RefinableString97(filter=7/0/*),RefinableString98(filter=7/0/*),RefinableString99(filter=7/0/*),Responsibilities(filter=7/0/*),SharedWithInternal(filter=7/0/*),Site(filter=7/0/*),SPContentType(filter=7/0/*),SPSiteURL(filter=7/0/*),Tags(filter=7/0/*),UsageEventItemId(filter=7/0/*),WebTemplate(filter=7/0/*),WordCustomRefiner1(filter=7/0/*),WordCustomRefiner2(filter=7/0/*),WordCustomRefiner3(filter=7/0/*),WordCustomRefiner4(filter=7/0/*),WordCustomRefiner5(filter=7/0/*),WordExactCustomRefiner(filter=7/0/*),WordPartCustomRefiner1(filter=7/0/*),WordPartCustomRefiner2(filter=7/0/*),WordPartCustomRefiner3(filter=7/0/*),WordPartCustomRefiner4(filter=7/0/*),WordPartCustomRefiner5(filter=7/0/*),WordPartExactCustomRefiner(filter=7/0/*)</Parameter>
    </SetProperty>
    <ObjectPath Id="12" ObjectPathId="11" />
    <Method Name="Add" Id="13" ObjectPathId="11">
    <Parameters>
    <Parameter Type="String">Path</Parameter>
    </Parameters>
    </Method>
    <Method Name="Add" Id="14" ObjectPathId="11">
    <Parameters>
    <Parameter Type="String">Title</Parameter>
    </Parameters>
    </Method>
    <ObjectPath Id="16" ObjectPathId="15" />
    <Method Name="Add" Id="17" ObjectPathId="15">
    <Parameters>
    <Parameter Type="String">Title</Parameter>
    </Parameters>
    </Method>
    <Method Name="Add" Id="18" ObjectPathId="15">
    <Parameters>
    <Parameter Type="String">Path</Parameter>
    </Parameters>
    </Method>
    <Method Name="Add" Id="19" ObjectPathId="15">
    <Parameters>
    <Parameter Type="String">Author</Parameter>
    </Parameters>
    </Method>
    <Method Name="Add" Id="20" ObjectPathId="15">
    <Parameters>
    <Parameter Type="String">SectionNames</Parameter>
    </Parameters>
    </Method>
    <Method Name="Add" Id="21" ObjectPathId="15">
    <Parameters>
    <Parameter Type="String">SiteDescription</Parameter>
    </Parameters>
    </Method>
    <SetProperty Id="22" ObjectPathId="0" Name="TrimDuplicates">
    <Parameter Type="Boolean">false</Parameter>
    </SetProperty>
    <ObjectPath Id="24" ObjectPathId="23" />
    <Method Name="SetQueryPropertyValue" Id="25" ObjectPathId="23">
    <Parameters>
    <Parameter Type="String">FillIn</Parameter>
    <Parameter Type="Dictionary">
    <Property Name="$4_1" Type="String">false</Property>
    <Property Name="$0_1" Type="Number">1</Property>
    <Property Name="$1_1" Type="Boolean">false</Property>
    <Property Name="$2_1" Type="Number">0</Property>
    <Property Name="$3_1" Type="Null" />
    </Parameter>
    </Parameters>
    </Method>
    <Method Name="SetQueryPropertyValue" Id="26" ObjectPathId="23">
    <Parameters>
    <Parameter Type="String">EnableStacking</Parameter>
    <Parameter Type="Dictionary">
    <Property Name="$1_1" Type="Boolean">true</Property>
    <Property Name="$0_1" Type="Number">3</Property>
    <Property Name="$2_1" Type="Number">0</Property>
    <Property Name="$3_1" Type="Null" />
    <Property Name="$4_1" Type="Null" />
    </Parameter>
    </Parameters>
    </Method>
    <Method Name="SetQueryPropertyValue" Id="27" ObjectPathId="23">
    <Parameters>
    <Parameter Type="String">TryCache</Parameter>
    <Parameter Type="Dictionary">
    <Property Name="$1_1" Type="Boolean">true</Property>
    <Property Name="$0_1" Type="Number">3</Property>
    <Property Name="$2_1" Type="Number">0</Property>
    <Property Name="$3_1" Type="Null" />
    <Property Name="$4_1" Type="Null" />
    </Parameter>
    </Parameters>
    </Method>
    <Method Name="SetQueryPropertyValue" Id="28" ObjectPathId="23">
    <Parameters>
    <Parameter Type="String">ListId</Parameter>
    <Parameter Type="Dictionary">
    <Property Name="$4_1" Type="String">b9b9c3b8-92d8-4850-a3b3-fc2544b9c6c0</Property>
    <Property Name="$0_1" Type="Number">1</Property>
    <Property Name="$1_1" Type="Boolean">false</Property>
    <Property Name="$2_1" Type="Number">0</Property>
    <Property Name="$3_1" Type="Null" />
    </Parameter>
    </Parameters>
    </Method>
    <Method Name="SetQueryPropertyValue" Id="29" ObjectPathId="23">
    <Parameters>
    <Parameter Type="String">ListItemId</Parameter>
    <Parameter Type="Dictionary">
    <Property Name="$2_1" Type="Number">27</Property>
    <Property Name="$0_1" Type="Number">2</Property>
    <Property Name="$1_1" Type="Boolean">false</Property>
    <Property Name="$3_1" Type="Null" />
    <Property Name="$4_1" Type="Null" />
    </Parameter>
    </Parameters>
    </Method>
    <Method Name="SetQueryPropertyValue" Id="30" ObjectPathId="23">
    <Parameters>
    <Parameter Type="String">OverrideExpandedTokens</Parameter>
    <Parameter Type="Dictionary">
    <Property Name="$1_1" Type="Boolean">true</Property>
    <Property Name="$0_1" Type="Number">3</Property>
    <Property Name="$2_1" Type="Number">0</Property>
    <Property Name="$3_1" Type="Null" />
    <Property Name="$4_1" Type="Null" />
    </Parameter>
    </Parameters>
    </Method>
    <SetProperty Id="31" ObjectPathId="0" Name="ResultsUrl">
    <Parameter Type="String">/news/Pages/Announcements.aspx</Parameter>
    </SetProperty>
    <SetProperty Id="32" ObjectPathId="0" Name="ClientType">
    <Parameter Type="String">SearchWebPartConfiguration</Parameter>
    </SetProperty>
    <SetProperty Id="33" ObjectPathId="0" Name="EnableInterleaving">
    <Parameter Type="Boolean">false</Parameter>
    </SetProperty>
    <Method Name="SetQueryPropertyValue" Id="34" ObjectPathId="23">
    <Parameters>
    <Parameter Type="String">QuerySession</Parameter>
    <Parameter Type="Dictionary">
    <Property Name="$4_1" Type="String">a5fa2e59-91c1-472e-a63d-d99d2fbf8fd0</Property>
    <Property Name="$0_1" Type="Number">1</Property>
    <Property Name="$1_1" Type="Boolean">false</Property>
    <Property Name="$2_1" Type="Number">0</Property>
    <Property Name="$3_1" Type="Null" />
    </Parameter>
    </Parameters>
    </Method>
    <SetProperty Id="35" ObjectPathId="0" Name="SafeQueryPropertiesTemplateUrl">
    <Parameter Type="String">sitesearch://webroot</Parameter>
    </SetProperty>
    <SetProperty Id="36" ObjectPathId="0" Name="IgnoreSafeQueryPropertiesTemplateUrl">
    <Parameter Type="Boolean">false</Parameter>
    </SetProperty>
    <ObjectPath Id="38" ObjectPathId="37" />
    <ExceptionHandlingScope Id="39">
    <TryScope Id="41">
    <Method Name="ExecuteQueries" Id="43" ObjectPathId="37">
    <Parameters>
    <Parameter Type="Array">
    <Object Type="String">4c78ef1c-cad2-417c-9027-9c961143713cDefault</Object>
    </Parameter>
    <Parameter Type="Array">
    <Object Type="Dictionary">
    <Property Name="$R_0" Type="Null" />
    <Property Name="$2P_0" Type="Boolean">false</Property>
    </Object>
    </Parameter>
    <Parameter Type="Boolean">true</Parameter>
    </Parameters>
    </Method>
    </TryScope>
    <CatchScope Id="45" />
    </ExceptionHandlingScope>
    </Actions>
    <ObjectPaths>
    <Constructor Id="0" TypeId="{80173281-fffd-47b6-9a49-312e06ff8428}" />
    <Property Id="3" ParentId="0" Name="SortList" />
    <Property Id="11" ParentId="0" Name="SelectProperties" />
    <Property Id="15" ParentId="0" Name="HitHighlightedProperties" />
    <Property Id="23" ParentId="0" Name="Properties" />
    <Constructor Id="37" TypeId="{8d2ac302-db2f-46fe-9015-872b35f15098}" />
    </ObjectPaths>
    </Request>
    Many thanks for your review.

  • 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