How to retrive latest items from different site collection using content search web part

I have a web application that contains two site collections(team site + enterprise wiki), with the following URLs:-
-http://applicationname/teamsite
-http://applicationname/enterprisewik
Now I need to display the latest 10 wiki pages that are inside the enterprise wiki site collection (according to the modified date) inside the team site. So I read that using Content search web part allows for cross-site content query.
So 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 library and to specify that I need to get the latest 10 wiki pages using the
content search web part's query dialog box? Can anyone advice please ?
Thanks

Edit the webpart and click change query in search criteria.  click on switch to advanced mode and enter your path:
(path:"http://applicationname/teamsite" OR path:"http://applicationname/enterprisewik")
you can specify sorting by created date and click ok.  in number of items to show, type 10.  this should fulfill your requirement.
For further reading, here are some links:
http://office.microsoft.com/en-001/office365-sharepoint-online-enterprise-help/configure-a-content-search-web-part-in-sharepoint-HA104119042.aspx
http://blogs.technet.com/b/tothesharepoint/archive/2013/04/30/stage-9-configure-the-
query-in-a-content-search-web-part-on-a-category-page.aspx
http://blogs.technet.com/b/tothesharepoint/archive/2013/05/23/stage-10-configure-the-query-in-a-content-search-web-part-on-a-catalog-item-page.aspx
kashif

Similar Messages

  • 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

  • Item title won't show in Content Search Web Part

    Hi,
    I am trying to show news items from one site on another site. I can show all attributes so far, except for the title.
    The field name of the title in the news item is 'title'.
    In crawled properties, I have linked the title to Title, RefinableString00 and RefinableString12.
    But the title either displays DispForm.aspx as a title (when I select title), or nothing (when I select the mapped property RefinableString00 or RefinableString12).
    What can/should I do to show the title field?

    Hi,
    According to your post, my understanding is that Item title did not show in Content Search Web Part.
    You need to open the webpart either in SP designer or visual studio or as matter of fact in Notepad and search for the special property. And then add your list columns which you wants to display.
    More information:
    How to: Display Custom Fields in a SharePoint Content By Query Web Part (ECM)
    SharePoint: Content Query Webpart - OOB, Custom Fields, Custom Style with Table format
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Cannot retrieve data from PublishingPageContentOWSHTML in a Content Search Web Part

    I tried to display the content of a page using Content Search Web Part, the page is stored in a Pages library and the content type is Article Page.  When the data is retrieved in the Content Search Web Part, the page content mapping to PublishingPageContentOWSHTML
    is empty, although other data, such as Title and Page Image, can be retrieved.  It's very strange that I can do this work correctly for another CSWP web part, that page is stored in a Pages library in another subsite.  Both of the CSWP web parts
    are on the same publishing site.
    Could everybody tell me what I was doing wrong?   Thanks you very much in advance.
    Newbie to SharePoint.

    Hi Albert GSC, I had the same problem. I'm starting now with display templates and after including "'SecondaryFileExtension','ContentTypeId'" at the end of the mso:ManagedPropertyMapping section it worked.
    For example, my mso:ManagedPropertyMapping section was (PublishingPageContentOWSHTML returns empty):
    <mso:ManagedPropertyMapping msdt:dt="string">
    'Picture URL'{URL de la imagen}:'PublishingImage;PictureURL;PictureThumbnailURL',
    'Link URL'{Dirección URL del vínculo}:'Path',
    'Line 1':'ArticleStartDateOWSDATE',
    'Line 2':'Title',
    'Line 3':'PublishingPageContentOWSHTML'
    </mso:ManagedPropertyMapping>
    Then I included "'SecondaryFileExtension','ContentTypeId'" (PublishingPageContentOWSHTML returns its value):
    <mso:ManagedPropertyMapping msdt:dt="string">
    'Picture URL'{URL de la imagen}:'PublishingImage;PictureURL;PictureThumbnailURL',
    'Link URL'{Dirección URL del vínculo}:'Path',
    'Line 1':'ArticleStartDateOWSDATE',
    'Line 2':'Title',
    'Line 3':'PublishingPageContentOWSHTML',
    'SecondaryFileExtension','ContentTypeId'
    </mso:ManagedPropertyMapping>
    Still don't understand why but I'm looking for the reason, until then hope it helps

  • How to display all the surveys using content query web part

    Can you please tell me how to display all the surveys using content query web part in more details? I also created a subsite and multiple surveys in that site. Then, I inserted a Content Query Web Part and select the List Type to be "Survey",
    however, it returned nothing. Did I miss anything?

    Hi,
    OOTB Survey List does not contain any
    Content Types and it has the following structure:
    Response entry is represented by
    List Item
    Response entry consist of questions and answers, where Question correspond to
    Field and Answer to Item value respectively.
    For querying Survey List via CQWP  the following properties could be used
    BaseType 
    <Lists BaseType="4">
    ServerTemplate
    <Lists ServerTemplate="102">
    Example
    To retrieve all the responses from Survey lists, specify List Type property as shown on picture
    Reference:
    http://stackoverflow.com/questions/17280778/display-all-surveys-using-content-query-web-part
    Best Regards,
    Eric
    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]

  • 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 over HTTPS for a Host Named Site Collection

    Hello
    I have a host named site collection http://media.contoso.com which is a media portal that stores videos and pictures. On my parent site collection http://site.contoso.com homepage I have a Content Search Web Part that displays videos from the media portal.
    Both sites work over https.
    When I edit the content search web part and enter the URL http://media.contoso.com in the 'Change Query' box, search returns the results as expected but when I enter the URL as
    https://media.contoso.com no results are returned.
    I have removed the binding in IIS to point to http://media.contoso.com.
    I need it to be https so that I don't see "HTTPS security is compromised by http://media.contoso.com" on my site collection homepage.
    Any idea why this is happening?
    Thanks
    Yoshi

    http://technet.microsoft.com/en-us/library/ee792873%28v=office.15%29.aspx
    In the Search SSL Settings dialog box, do one of the following:
    If you do not want the crawler to crawl a site when there is an SSL certificate warning, make sure that the
    Ignore SSL certificate name warnings check box is cleared. For security reasons, the check box is cleared by default.
    If you want the crawler to crawl a site even if there is an SSL certificate warning, make sure that the
    Ignore SSL certificate name warnings check box is selected.
    If this helped you resolve your issue, please mark it Answered. You can reach me through http://freeit-support.com/

  • More than 50 items in content Search Web part

    HI,
    How can i override the maximul limit of 50 items in a content search web part?
    I have a specific requirement where I need to show more than 500 items with Paging activated.
    Kindly advise hwo it can be achieved.
    Thanks,
    kesari suresh

    Hello , 
    The client side solution
    proposed by Matt
    Stark int this work around Blog 
    not workling as i wish ,  i have set the limit to 700 but the webPart still get it limit  50 instead of 700.
    in my display template ,  ctx.ClientControl.get_numberOfItems()=700 but only 50 items per page are rendred.
    What's wrong ?
    Any help will be appreciated.
    Thanks

  • 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

  • Uploading multiple documents into sharepoint list item with REST in sharepoint 2013 using content editor web part :

    hi ,
    i am trying to upload multiple document files into sharepoint list item. I followed below link for implementaion.
    http://techfindings-prem.blogspot.in/search/label/jquery.multifilejs
    It was working for sharepoint hosted app.
     This complete code is written within content edito web part.
    It was working when i was in root site collection with below change (hard coded the root level url) in code in "UploadFile" function.
    var scriptbase = "http://servername" + "/_layouts/15/";
                console.log(' File size:' + bytes.length);
                $.getScript(scriptbase + "SP.RequestExecutor.js", function () {
                    var createitem = new SP.RequestExecutor("http://servername");
                    createitem.executeAsync({
                        url: "http://servername/sites/cpg/" + "/_api/web/lists/GetByTitle('SalesRecord')/items(" + attachmentitemid + ")/AttachmentFiles/add(FileName='"
    + fileName + "')",
                        method: "POST",
                        binaryStringRequestBody: true,
                        body: binary,
                        success: fsucc,
                        error: ferr,
                        state: "Update"
                    function fsucc(data) {
                        //alert( data.statusText + "\n\n" + data.responseText);
                        console.log(data + ' uploaded successfully');
                        deferred.resolve(data);
                    function ferr(data) {
                        //alert( data.statusText + "\n\n" + data.responseText);
                        console.log(fileName + "not uploaded error");
                        deferred.reject(data);
    But the issue came in picture when i was working with the other site collection instead of root one. The url was like below.
    "http://servername/sites/cpg/". This time i need to be there within "cpg" site collection. 
    Now if i hard code the url as i did above my code gets break here while come to below line
     $.getScript(scriptbase + "SP.RequestExecutor.js", function () {
    I am getting error when i used below code:
    var scriptbase = "http://servername" + "/_layouts/15/";
     $.getScript(scriptbase + "SP.RequestExecutor.js", function () {
                    var createitem = new SP.RequestExecutor("http://servername");
                    createitem.executeAsync({
                        url: "http://servername/sites/cpg/" + "/_api/web/lists/GetByTitle('SalesRecord')/items(" + attachmentitemid + ")/AttachmentFiles/add(FileName='"
    + fileName + "')",
                        method: "POST",
                        binaryStringRequestBody: true,
                        body: binary,
                        success: fsucc,
                        error: ferr,
                        state: "Update"
                    function fsucc(data) {
                        //alert( data.statusText + "\n\n" + data.responseText);
                        console.log(data + ' uploaded successfully');
                        deferred.resolve(data);
                    function ferr(data) {
                        //alert( data.statusText + "\n\n" + data.responseText);
                        console.log(fileName + "not uploaded error");
                        deferred.reject(data);
    Please hekp in this case. This complete code is written within content edito web part. 
    Regards:
    Sanjay Joshi

    Hi,
    According to your post, my understanding is that you have an issue about upload multiple documents files into library vai REST API.
    As you have said, you have used the hard code url in your code.
    How about use the _spPageContextInfo.webAbsoluteUrl method to get the url?
    I have used this method to get the url, then use the code in the article you have pasted within a content editor web part to upload the files.
    You can replace the hard code url with the _spPageContextInfo.webAbsoluteUrl method, then check whether it works.
    Thanks,
    Jason
    Jason Guo
    TechNet Community Support

  • Populate Lookup Lists from Different Site Collection

    Hi,
    we are using O365 environment
    We have 2 Site Collections: Site Collection 1 has Sub sites and has lookup Columns in Lists..
    This Subsite is created as a Site Collection 2 in O365 ..In Site Coll Lists we have Lists which has Lookup columns referring to Site Coll 1
    How do I bring the content over to Site coll 2 with Lookup columns without having the Lists moved from Site Coll1
    Thanks

    This can't be done out of the box.  It would require a custom solution or a 3rd party plugin (not sure if one exists or not).
    Brandon Atkinson
    Blog: http://sharepointbrandon.com

  • How to select an item from a dropdown menu using Enter key

    A website I frequently use opens with a dropdown menu. Using my former browser, I was able to select the an item from the dropdown list by hitting the first letter with my keyboard and then hitting Enter. (Think of entering an address and selecting TX from a dropdown menu of states. Often you can hit T twice to get to TX and then the Enter key will advance the cursor to the zip code field.) Since converting to Firefox, the Enter key no longer works to advance to the next screen...I now have to move the mouse to a "Go" button and click it after selecting the desired item from the downdown menu. It's a small thing, but constantly switching back and forth between mouse and keyboard is becoming annoying. Is there an option in Firefox to select items simply by highlighting them in the dropdown menu and hitting the Enter key, instead of having to use the mouse to click a "Go" button? Thanks

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    * https://support.mozilla.com/kb/Safe+Mode
    If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    * Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")
    In Firefox 4 you can use one of these to start in <u>[[Safe mode]]</u>:
    * Help > Restart with Add-ons Disabled
    * Hold down the Shift key while double clicking the Firefox desktop shortcut (Windows)
    * https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • Limit items in content search web part on carousel view.

    Hey, 
    I want to use CSWP Carousel to view photos. 
    Currently I have six images in my library (and nothing else), but tomorrow may be sixteen. In the WP settings I can have up to fifty items and can not leave this section blank. 
    In the CSWP I'm searching by path, so no chance it take items from other libraries.
    The problem: When I define a lot of items I get an empty display of items that do not exist instead of ignoring the items that not existed. 
    It does not make sense that I would have to enter the WP settings every time I change the number of items in the Library. 
    Thanks for the help ...

    Hello , 
    The client side solution
    proposed by Matt
    Stark int this work around Blog 
    not workling as i wish ,  i have set the limit to 700 but the webPart still get it limit  50 instead of 700.
    in my display template ,  ctx.ClientControl.get_numberOfItems()=700 but only 50 items per page are rendred.
    What's wrong ?
    Any help will be appreciated.
    Thanks

  • Compare 2 Document Libraries from different Site Collections

    Hello,
    We are in the middle of migrating from SP 2013 to SP 365 and I would like to be able to compare the documents from our existing document libraries to what was moved over to the corresponding 365 document library.  Is there a search feature in Windows
    or something easy someone can tell me about?  Right now I am taking screen shots of the 2 libraries and doing this manually.  I added a 'count' in my view in the library and that helped a little but thought there would be a search or something like
    that.  Any help is much appreciated!
    Joanie

    Hi 
    You can use ShareGate tool to compare or even move your whole document library to SP 365 with content and permissions.
    Also it comes with 15 day trial so you can review it and use it without any problem for 15 days
    http://en.share-gate.com/download
    http://en.share-gate.com/
    Please 'propose
    as answer' if it helped you, also 'vote
    helpful' if you like this reply.

  • How To Expand And Display Recurring Events In Content Search Web Part?

    I have a requirement to display all upcoming events. So I used content search webpart to display all the events, however the only problem is that I'm unable to expand recurring events all together. Is there a way to do this?
    Vamsi Munagala

    Hi Vamsi,
    Per my knowledge, where is no OOB method to achieve your requirement.
    As a workaround, we can customize a web part to achieve it, querying Recurring Events using CAML Query and display the results in a SPGridView.
    https://jtheblog.wordpress.com/2011/08/10/sharepoint-caml-for-calendar-recurring-events/
    Best Regards
    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]

Maybe you are looking for

  • Overlap transitions choppy after exporting 'Full Quality' QuickTime

    I have a movie created with images and music, no video. I used the overlap transition between each image. All images have a slight Ken Burns effect. Then I exported to Full Quality Quicktime to bring into iDVD. I originally tried to export right to i

  • Is Tree node open or closed ?

    How do I check for this ? I`m using expandChildrenOf to expand all children of a clicked node (label). I would like it to reverse it (pass 'false' as second arg to expandAllChildren) if the node is already open. But how do I know its open ? Have look

  • Flesh & Java

    Hi everyone... I want to make a simple application that integrates a flesh interface with a Java back end. I am using Eclipse Europa (V3.3.1.1) to make the Java part, and Flex Builder 2 (2.0.1) to make the interface (separated IDEs, since Eclipse Eur

  • Wi-Fi just stopped working on my Satellite A300

    I bought a Toshiba Satellite A300 (Vista) and everything started out just fine. The second day my Wi-Fi connection just shut down while I was online... just after not doing anything, and now I cant get it back on. The wifi-button and the FN-F8 is ON.

  • Duplicating Conditions in Schema

    Hi All I want to link a Delivery Cost Condition to the Discount Condition. e.g. Condition ZAB1 - Discount Condition - Percentage - Negative Condition ZAB2 - Delivery Cost - Percnentage - Positive I want to flow the Percentage of the Delivery Cost Con