Document Set name as refiner in Search results?

I'm wondering if there is a way to use the document set name as a refiner in a search results page so a user can search a specific site or document library and choose the document set name to narrow the results? Initially I thought I could create a
shared column on the document set (in the properties of the document set type itself) which looked up or calculated the document set name and then this would be shared with the documents within the set. I couldn't find a way to get the name of the set.
What would be the best way (if any), of getting the search results or document properties themselves (if I created a column which contained the document set name for e.g.) to show the document set (if populated) that the document belongs to?
Document Library
Document 1
Document 2
Document Set A
     Document A1
     Document A2
Document Set B
     Document B1
How can I get search results to show a refiner on Document A1 and A2 indicating they're in the same Document Set A? I realise I need crawled/managed property but how best should I set this up?
If this is not possible can anyone suggest an alternative please?
Many thanks!
Scott

Hi,
I am afraid that there is no existing managed properties on the document which we can count on to know which document sets the document belongs to.  Just like what you said "created a column which contained the document set name", this could
be a workaround to achieve what you want.
To do that:
1. Add a new site column named DocumentSetName and add it to
DocumentSet Content Type. And give value "DocumentSet_A" for document set A and "DocumentSet_B" for document set B.
2. In the Document Set settings, enable the newly added column as
Shared Columns. It means that all documents added to this document set will share the column and its value.
3. Reindex this document library.
4. In the Search Results refiner, add the automatically created Managed Property
as Refiner. 
With this method, you can filter the documents with the name of document sets when searching office documents in search center. The only information you need input manually is Value of the site column.
http://blogs.technet.com/b/sharepoint_made_easy/archive/2013/03/19/step-by-step-configuration-to-add-custom-refiners-in-the-refinement-panel-of-search-results-page-for-sharepoint-online.aspx
Moreover, if you have the requirement to create batch of DocumentSets without any manual input, you can refer to the following link which explain how to create them with proper settings and default values.
http://www.c-sharpcorner.com/Blogs/12139/how-to-create-document-set-using-csom-in-sharepoint-2013.aspx
Miles LI TechNet Community Support

Similar Messages

  • Show the custom popup window on clicking the people name in sharepoint people search result

    Show the custom popup window on clicking the people name in sharepoint people search result
    We are doing the below code to open a popup but while clicking on name link its postback the page and not opening the popup in first click but opening in second click.The same issue occurs while navigate to second page using pagination
    The below code used to show name in item template
    <button id="NameFieldLink" class="temp" style="font-size: 12px;text-decoration:none;color:#0072c6;border:0px solid #fff;background:transparent;margin-left: 1px;height: 15px;padding: 0 10px 17px 0px;text-align: left;cursor:pointer;font-family:
    Arial, Helvetica, sans-serif;" title="">_#= DisName =#_</button> 
    The below jquery code used to open popup in control search template
    ctx.OnPostRender = []; 
    ctx.OnPostRender.push(function () {
    $(".temp").on("click", function(event)
    event.preventDefault();
    $('#fadeout').show();
    $('#pop1').find('.tab-content-people').html($(this).closest('.emp-card').find('.pop-content').html());
    $('#pop1').show();
    return false;

    I believe the issue is that you are not actually searching against the result source you made in step #1.
    It's not enough to make a result source, you have to tell the search results web part to use it.
    Try this:
    1. Go to the Pages library of Search Center
    2. Create a new Search Results page
    3. Edit the page, then edit the search results web part
    4. Change the source for the search results web part to your source
    5. Add the page to your Search Center navigation
    6. Run the search on that page
    Scot
    Author,
    Microsoft SharePoint 2013 App Development
    Author,
    Professional Business Connectivity Services
    Author,
    Inside SharePoint 2013
    Blog, www.shillier.com
    Twitter, @ScotHillier
    SharePoint Trainer, Critical Path Training

  • Setting Custom Master page in search results page - Publishing site

    Hi,
    I have a publishing site, in which i have a custom Master page.
    However when doing the search in the site, the search results does not show the custom Master page.
    Is it possible to set the custom created Master page for the search results page? How to achieve this?
    Thanks

    Hi Venkat,
    The search page for a publishing site is a file available in the layouts folder (I believe it is the osssearchresults.aspx if you see the address bar). It is used by all web applications and site collections in your farm. So ideally you should not change
    it. I mean you can change it to point to your master page but it is bad practice ..
    I would instead do the following
    1. Create a custom search results web part page and place it in the site collection itself (one of the document libraries)
    2. Custom search results is not difficult because all search results pages are made of a set of Out of the box search results web parts. If you add the same webparts to your page as the default search results page, you have effectively created a copy of
    it
    3. go to site settings --> search settings and change the search results page to your newly created page
    4. The newly created page by virtue of its location will automatically use the master page the rest of the site uses.
    I could not spend the time to try the above for you but I am sure the above will work.
    Thanks and Regards,
    Partha
    AvePoint

  • Folder name showing in the search result in SharePoint 2013

    Hello,
    In SharePoint 2013, when user search for a document within a folder, Search content along with Folder name and icon getting displayed in the search result. I am trying to hide Folder name from search result. Please suggest some way to achieve this.
    Thank you
    Jyotiraaditya

    Hi,
    As I understand, you want to search without folders in SharePoint 2013.
    You can do the steps to achieve your request:
    In search center in results page, click Edit page.
    In search results web part, click dropdown in the upper right corner -> click Edit Web Part.
    Click Change query -> in Property filter field -> choose contenttype, not contains, folder  -> click Add property filter -> ok.
    Thanks,
    Dean Wang

  • Can you refine people search results using a SharePoint 2013 search service application connected in SharePoint 2010?

    We have an SP2010 farm which is now using some of the service applications from an SP2013 farm, including the search, managed metadata and user profile.  This is part of an upgrade programme of work which will involve upgrading infrastructure and
    then gradually the sites, and this is seen as one way to minimise the impact.
    So, the SP2010 search results are being generated by the SP2013 which is indexing the SP2010 content.  The initial results appear fine, however, the refiners in the people results for Job Title and Department are no longer working.  We are receiving
    a 404 page not found, even though the page is there as was working before.
    If we compare the URL generated in SP2010 for refining results to an OOTB SP2013 search centre site, there is clearly a big difference to the format.  Example below is where LastName is Smith and then refined where Department is HR.
    SP2010 URL which now gives a 404 error:
    http://intranet2010/search/pages/peopleresults.aspx?k=LastName%3Asmith&r=%22owstaxIdSPShDepartment%22%3D%23832e3479%2Dd168%2D4620%2Dac69%2D9b00a4c4205b%3A%22HR%22
    OOTB SP2013 URL:
    http://intranet2013/search/pages/peopleresults.aspx?k%3Asmith#Default=%7B%22k%22%3A%22smith%22%2C%22r%22%3A%5B%7B%22n%22%3A%22Department%22%2C%22t%22%3A%5B%22%5C%22%C7%82%C7%824335%5C%22%22%5D%2C%22o%22%3A%22and%22%2C%22m%22%3Anull%2C%22k%22%3Afalse%7D%5D%7D
    I've looked at the URL decoded versions so can see how the query is built up.
    Any ideas?  Is this even possible?
    Matt

    All working now.  Turns out there was an entry in the web.config which was causing issues.
      <denyQueryStringSequences>
          <add sequence="ID" />
      </denyQueryStringSequences>
    Seems IIS is denying something in the query string.  We removed the whole section as was not needed.
    http://www.iis.net/configreference/system.webserver/security/requestfiltering/denyquerystringsequences
    Thanks to a colleague who spotted this; I would've never of thought to check the web.config for something like this.

  • Filter/refine sharepoint search result

    Hi All,
    I have the following scenario.
    I'm working on Sharepoint online 2013. I need to filter Search based on a dropdown list in the page. I want the search webpart to read value from dropdown , add it to the url and filter results based on it . This drop down is not a part of Refinement web
    part. How can I achieve this ?
    Thanks for your help

    You can either create a custom control template which has the logic and appends the selection to the query, or add custom html/script which adds a URL parameter which you can pick up as a variable in a query template. You can read more about query variables
    at my post http://techmikael.blogspot.no/2014/05/s15e03-query-variables-constant-trouble.html
    Thanks,
    Mikael Svenson - Search Enthusiast
    SharePoint MVP/MCPD/P-TSP - If you find an answer useful, please up-vote it.
    http://techmikael.blogspot.com/
    Author of
    SharePoint Search Queries Explained and
    Working with FAST Search Server 2010 for SharePoint

  • Is it possible to get Spotlight to list search results by closest name match not document type?

    Example: when I type 'wireless info' into Spotlight on my computer the document 'wireless info' is the 29th search result listed.  The top hit is a mail message named 'Re: Re: Reset the device, and new wireless info'.  The other 27 items in the list above the document I was looking for are things like 'Introducing Portland.doc' and 'Les Amis B&B'.  So spotlight is not very good at locating something when you know exactly what it is you are looking for.

    Thanks Barney.  Your advice was spot on.  But today I downloaded the new Yosemite OS and the behaviour is exactly reversed!  Spotlight can now be used for searching folders and shows my folder as the top hit, and finder does not show the folder at all in its search results of my Mac.  See below:

  • Search results not returning file names correctly

    Have an onsite SharePoint Server 2010 Enterprise that contains a number of documents in a document library all containing the word "south" in their title. When a search is run with the keyword "south" all 3 files are shown in the results but only one displays
    the correct title. The other 2 display alternate text (in this case the company name). The links all 3 results are correct, however the title of results is incorrect for 2 out of the 3.
    I have duplicated these results using Office 365 and another on site SharePoint 2010 server.
    I have duplicated these results converting the documents to DOCX format under Word 2007 and Word 2010.
    Obviously, this is an issue with the files, however any ideas where to start looking to uncover where the SharePoint Server is pulling the information from? 
    In the end I need all 3 results to display the current name of the files it finds, not simply some random text with the files from 2 out of 3 of the results.
    Thanks
    Robert Crane
    www.ciaops.com 

    Could it be because of this?
    Pasted from here:
    http://bpostutor.com/post/Hidden-SharePoint-2010-Feature-Changes-Document-Titles-in-Search-Results.aspx
    Hidden SharePoint 2010 Feature Changes Document Titles in Search Results
    SharePoint 2010 has a interesting feature which you may not know about.  It's called Optimistic Title.  It's part of the Office Search engine within SharePoint.  What it does is determine a new, hopefully more relevant title for your documents
    to be displayed in your search results based on document properties or the actual contents of the document (i.e. Text within the file).  As you might expect this is closely tied to the Office document formats such as Word, PowerPoint, Excel, OneNote,
    and Visio.  Your end users may report that the titles that they see for search results differ greatly from the file name or the actual title of the document.  This is particularly evident with PowerPoint files where the name of the first slide
    is often used. The behavior is not entirely predictable.  Different results can be expected from Office 2007 and Office 2010 created files and even those created in earlier versions of Microsoft Office. 
    If you want to change this functionality you need to actually go and edit the registry on your Search role server(s) within your SharePoint farm, restart the osearch14 service and then do a full crawl.  The key you want to modify is the EnableOptimisticTitleOverride.
    The default setting is 1. Change it to 0 to disable the feature.

  • Questions on saving document, search result and location

    SAVE DOCUMENT
    Is it possible to save the document directly on the IFS's repository? Shall I save the document as local copy and then to upload the document on the IFS repository?
    SEARCH RESULT
    If I do "Find" + "on documents", I haven't unexpected results. But, in the result list, some documents are missing although they are mapping the research criterias.
    LOCATION
    In the results list, if I move the mouse cursor over a document link : I can read "http://fileserver:81/:12697" What does it means ? Where is stored this document ?
    null

    You should save the document as local copy and then to upload the document on the IFS repository.
    Some of the files might not have been indexed yet when you did search. Or possible you didn't have discovery permission to some of the files.
    "http://fileserver:81/:12697"
    It means the DocID of this document.

  • Special letter in file name in search results

    I have follow this quid
    http://charliedigital.com/2011/12/16/force-file-name-in-sharepoint-2010-search-results/ to change XSL to display file name in search results instead of title. It works very well. I'm happy. But I find a small thing. the special character in file name (e.g.
    Ö, Ü ...) cannot be displayed correctly. But before changing those special letter can be displayed in title correctly. How can I do to solve this problem? I put following XSL:
    <xsl:otherwise>
        <a id="{concat($currentId,'_Title')}">
            <xsl:attribute
    name="href">
    <xsl:value-of  select="$url"/>
            </xsl:attribute>
            <xsl:attribute
    name="title">
    <xsl:value-of select="title"/>
            </xsl:attribute>
            <xsl:if
    test="$isdocument">
    <xsl:value-of select="filename"/>
            </xsl:if>
            <xsl:if
    test="not($isdocument)">
    <xsl:choose>
    <xsl:when test="hithighlightedproperties/HHTitle[. != '']">
    <xsl:call-template name="HitHighlighting">
    <xsl:with-param name="hh"
    select="hithighlightedproperties/HHTitle"
    />
    </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
    <xsl:value-of select="title"/>
    </xsl:otherwise>
    </xsl:choose>
            </xsl:if>
        </a>
    </xsl:otherwise>

    Hi
    I think
    that special characters are not related to
    the change in the XML file
    on your personalized results page.
    With the original XML
    special characters display correctly?
    You can use
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
    <xsl:template match="/">
    <xmp><xsl:copy-of select="*"/></xmp>
    </xsl:template>
    </xsl:stylesheet>
    to see results with another encoding
    Miguel de Hortaleza

  • Create Link does not work in a Search Result (SearchResultLayoutSet)

    Hello,
    we changed  in a search iView the "Layout Set for Search Results" to the standard ConsumerExplorer. Because we would like to allow people to "Create Links" from the documents which are shown in the search result. But the Create Link function is showing the following error:
    Item not found
    The item you are attempting to access is not available. Check that the name or link is correct. You might also check whether the associated repository is currently accessible.
    Does any can help and guide which part could responsible for that behaviour?
    Thanks in advance.
    David

    Hi,
    This happens to me now, however It still doesn't work even after the privileges are granted.
    I created a procedure to help create program using dbms_scheduler
    =======================================================
    PROCEDURE create_prg_create_running_dir
    IS
    BEGIN
    SYS.dbms_scheduler.create_program
    (program_name => 'PRG_CREATE_RUNDIR',
    program_type => 'EXECUTABLE',
    program_action => '/export/home/jobmgr/scripts/CREATE_JOB_RUNDIR/create_job_rundir.sh',
    number_of_arguments => 1,
    enabled => FALSE,
    comments => 'Program to create job running directory'
    SYS.dbms_scheduler.define_metadata_argument
    (program_name => 'PRG_CREATE_RUNDIR',
    metadata_attribute => 'JOB_NAME',
    argument_position => 1,
    argument_name => 'JOB_NAME'
    SYS.dbms_scheduler.ENABLE ('PRG_CREATE_RUNDIR');
    END create_prg_create_running_dir;
    ========================================================
    I tried calling it from sqlplus
    SQL> exec ops$jobmgr.job_scheduler.create_job_program('test_import','executable','/export/home/jobmgr/scripts/IMP_FIRS_DATA/imp_firs_data.sh',2)
    BEGIN ops$jobmgr.job_scheduler.create_job_program('test_import','executable','/export/home/jobmgr/scripts/IMP_FIRS_DATA/imp_firs_data.sh',2); END;
    ERROR at line 1:
    ORA-27486: insufficient privileges
    ORA-06512: at "SYS.DBMS_ISCHED", line 5
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 30
    ORA-06512: at "OPS$JOBMGR.JOB_SCHEDULER", line 61
    ORA-06512: at line 1
    If I create the program directly (calling DBMS_SCHEDULER directly), the program can be created.
    I have granted EXECUTE privilege on DBMS_SCHEDULER & DBMS_ISCHED to this user too.
    Hope anyone can help.
    Thanks

  • Search results showing incorrect modified date

    Hi All,
    I have a one difficulty in search results.
    Document showing incorrect modified date in search results. And this happens for one document only.
    We have customized the search/results.aspx page, Our document is showing correct modified date in document properties,All Items.aspx like 31/4/2013.
    But when i search with document name in search, result showing incorrect modified date like 24/6/2004.
    I checked with database in SQL, every thing is fine.
    I have updated the Modified date through powershell script for one document and after that this recent modified date is showing in search results.
    But after updating the Modified date through powershell, issued document not showing the recent modified date in search results. still showing as 24/6/2004.
    I should not do edit property and save, to create new version.
    I don't know what is happening in search crawl. All ready full crawl running daily basis.
    I want to check whether this issued document is crawling or not. Could anybody help me to get out of this. what is the main cause of this issue.
    Thanks & Regards
    MD.Liakath ali

    Hi,
    I'm seeing the same issue after upgrading the SharePoint 2010 to SharePoint 2013.
    When I search any upgraded document in SharePoint 2013, the document's "Last Modified Date" was showing an incorrect value in Search Results page but other metadata of document like "Last Modified User" is showing the correct
    value so the problem is not with document crawl, something wrong with Last Modified Date property in Search results.
    I have seen below comment as answer but I didn't understand the solution to fix this issue for all upgraded documents.
    The most likely cause is that there is metadata on the documents that is set to that date which is overriding the other dates in the search result. SharePoint isn't particulary imaginative so it's got to be finding that date from somewhere.
    Do we have any solution for this issue? Is this issue will be addressed in SharePoint 2013 SP1?
    Note: No issues with documents, which uploaded after upgrade.

  • Manage DocumentAbstract Search result property

    Hello,
    I have develop a 3° party index using KM documentation "Integrating 3rd-Party Search Engines into KM Index Management"
    The index is well working.
    But I do not want to change the renderer of existing result search screen.
    This mean that i need to map my data with the properties that are defined for the StandardSearchResultRenderer.
    (See
    http://help.sap.com/saphelp_nw04/helpdata/en/79/a1d23e6b2c3d67e10000000a114084/frameset.htm document to understand the display of search result properties) 
    I manage to map my data with the following properties: lastmodified,  lastmodifiedby, description, displayname, contentlink
    Example of code implementation:
    new Property(new PropertyName(IWcmConst.SAP_WCM_NAMESPACE, IWcmConst.PROP_DISPLAYNAME), "Display Name")
    But I did not manage to map my data with the following properties : documentabstract, rankvalue, rating
    Has someone alreadey manage to map his data with the property documentabstract ?
    How can we do it ?
    Thanks,
    Fabien
    Message was edited by:
            fabien couton

    I have tried to set the value of documentAbstract using <b>searchResult.setContentSnippet("XXX");</b>
    where searchResult is of type <b>com.sapportals.wcm.service.indexmanagement.retrieval.search.ISearchResult</b>
    But I always have the abstract: "No document excerpt available" for all  my result.
    How can I set the value of the abstract (or contentSnippet) for each of my result ?
    Thanks,
    Fabien
    null

  • ADFS SSO and SharePoint 2013 on-premise Hybrid outbound search results from SharePoint Online - does it work?

    Hi, 
    I want to setup an outpund hybrid search for SharePoint 2013 on-premise to SharePoint Online.
    But I'm not shure if this works with ADFS SSO.
    Has somebody experience with this setup?
    Here's my guide which I'm going to use for this installation:
    Introduction
    In this post I'll show you how to get search results from your SharePoint Online in your SharePoint 2013 on-premise search center.
    Requirements
    User synchronisation ActiveDirectory to Office 365 with DirSync
    DirSync password sync or ADFS SSO
    SharePoint Online
    SharePoint 2013 on-premise
    Enterprise Search service
    SharePoint Online Management Shell
    Instructions
    All configuration will be done either in the Search Administration of the Central Administration or in the PowerShell console of your on-premise SharePoint 2013 server.
    Set up Sever to Server Trust
    Export certificates
    To create a server to server trust we need two certificates.
    [certificate name].pfx: In order to replace the STS certificate, the certificate is needed in Personal Information Exchange (PFX) format including the private key.
    [certificate name].cer: In order to set up a trust with Office 365 and Windows Azure ACS, the certificate is needed in CER Base64 format.
    First launch the Internet Information Services (IIS) Manager
    Select your SharePoint web server and double-click Server Certificates
    In the Actions pane, click Create Self-Signed Certificate
    Enter a name for the certificate and save it with OK
    To export the new certificate in the Pfx format select it and click Export in the Actions pane
    Fill the fields and click OK Export to: C:\[certificate
    name].pfx Password: [password]
    Also we need to export the certificate in the CER Base64 format. For that purpose make a right-click on the certificate select it and click on View...
    Click the Details tab and then click Copy to File
    On the Welcome to the Certificate Export Wizard page, click Next
    On the Export Private Key page, click Next
    On the Export File Format page, click Base-64 encoded X.509 (.CER), and then click Next.
    As file name enter C:\[certificate
    name].cer and then click Next
    Finish the export
    Import the new STS (SharePoint Token Service) certificate
    Let's update the certificate on the STS. Configure and run the PowerShell script below on your SharePoint server.
    if(-not (Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue)){Add-PSSnapin "Microsoft.SharePoint.PowerShell"}
    # set the cerficates paths and password
    $PfxCertPath = "c:\[certificate name].pfx"
    $PfxCertPassword = "[password]"
    $X64CertPath = "c:\[certificate name].cer"
    # get the encrypted pfx certificate object
    $PfxCert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 $PfxCertPath, $PfxCertPassword, 20
    # import it
    Set-SPSecurityTokenServiceConfig -ImportSigningCertificate $PfxCert
    Type Yes when prompted with the following message.
    You are about to change the signing certificate for the Security Token Service. Changing the certificate to an invalid, inaccessible or non-existent certificate will cause your SharePoint installation to stop functioning. Refer
    to the following article for instructions on how to change this certificate: http://go.microsoft.com/fwlink/?LinkID=178475. Are you
    sure, you want to continue?
    Restart IIS so STS picks up the new certificate.
    & iisreset
    & net stop SPTimerV4
    & net start SPTimerV4
    Now validate the certificate replacement by running several PowerShell commands and compare their outputs.
    # set the cerficates paths and password
    $PfxCertPath = "c:\[certificate name].pfx"
    $PfxCertPassword = "[password]"
    # get the encrypted pfx certificate object
    New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 $PfxCertPath, $PfxCertPassword, 20
    # compare the output above with this output
    (Get-SPSecurityTokenServiceConfig).LocalLoginProvider.SigningCertificate
    [/code]
    ## Establish the server to server trust
    [code lang="ps"]
    if(-not (Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue)){Add-PSSnapin "Microsoft.SharePoint.PowerShell"}
    Import-Module MSOnline
    Import-Module MSOnlineExtended
    # set the cerficates paths and password
    $PfxCertPath = "c:\[certificate name].pfx"
    $PfxCertPassword = "[password]"
    $X64CertPath = "c:\[certificate name].cer"
    # set the onpremise domain that you added to Office 365
    $SPCN = "sharepoint.domain.com"
    # your onpremise SharePoint site url
    $SPSite="http://sharepoint"
    # don't change this value
    $SPOAppID="00000003-0000-0ff1-ce00-000000000000"
    # get the encrypted pfx certificate object
    $PfxCert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 $PfxCertPath, $PfxCertPassword, 20
    # get the raw data
    $PfxCertBin = $PfxCert.GetRawCertData()
    # create a new certificate object
    $X64Cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2
    # import the base 64 encoded certificate
    $X64Cert.Import($X64CertPath)
    # get the raw data
    $X64CertBin = $X64Cert.GetRawCertData()
    # save base 64 string in variable
    $CredValue = [System.Convert]::ToBase64String($X64CertBin)
    # connect to office 3656
    Connect-MsolService
    # register the on-premise STS as service principal in Office 365
    # add a new service principal
    New-MsolServicePrincipalCredential -AppPrincipalId $SPOAppID -Type asymmetric -Usage Verify -Value $CredValue
    $MsolServicePrincipal = Get-MsolServicePrincipal -AppPrincipalId $SPOAppID
    $SPServicePrincipalNames = $MsolServicePrincipal.ServicePrincipalNames
    $SPServicePrincipalNames.Add("$SPOAppID/$SPCN")
    Set-MsolServicePrincipal -AppPrincipalId $SPOAppID -ServicePrincipalNames $SPServicePrincipalNames
    # get the online name identifier
    $MsolCompanyInformationID = (Get-MsolCompanyInformation).ObjectID
    $MsolServicePrincipalID = (Get-MsolServicePrincipal -ServicePrincipalName $SPOAppID).ObjectID
    $MsolNameIdentifier = "$MsolServicePrincipalID@$MsolCompanyInformationID"
    # establish the trust from on-premise with ACS (Azure Control Service)
    # add a new authenticatio realm
    $SPSite = Get-SPSite $SPSite
    $SPAppPrincipal = Register-SPAppPrincipal -site $SPSite.rootweb -nameIdentifier $MsolNameIdentifier -displayName "SharePoint Online"
    Set-SPAuthenticationRealm -realm $MsolServicePrincipalID
    # register the ACS application proxy and token issuer
    New-SPAzureAccessControlServiceApplicationProxy -Name "ACS" -MetadataServiceEndpointUri "https://accounts.accesscontrol.windows.net/metadata/json/1/" -DefaultProxyGroup
    New-SPTrustedSecurityTokenIssuer -MetadataEndpoint "https://accounts.accesscontrol.windows.net/metadata/json/1/" -IsTrustBroker -Name "ACS"
    Add a new result source
    To get search results from SharePoint Online we have to add a new result source. Run the following script in a PowerShell ISE session on your SharePoint 2013 on-premise server. Don't forget to update the settings region
    if(-not (Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue)){Add-PSSnapin "Microsoft.SharePoint.PowerShell"}
    # region settings
    $RemoteSharePointUrl = "http://[example].sharepoint.com"
    $ResultSourceName = "SharePoint Online"
    $QueryTransform = "{searchTerms}"
    $Provier = "SharePoint-Remoteanbieter"
    # region settings end
    $SPEnterpriseSearchServiceApplication = Get-SPEnterpriseSearchServiceApplication
    $FederationManager = New-Object Microsoft.Office.Server.Search.Administration.Query.FederationManager($SPEnterpriseSearchServiceApplication)
    $SPEnterpriseSearchOwner = Get-SPEnterpriseSearchOwner -Level Ssa
    $ResultSource = $FederationManager.GetSourceByName($ResultSourceName, $SPEnterpriseSearchOwner)
    if(!$ResultSource){
    Write-Host "Result source does not exist. Creating..."
    $ResultSource = $FederationManager.CreateSource($SPEnterpriseSearchOwner)
    $ResultSource.Name = $ResultSourceName
    $ResultSource.ProviderId = $FederationManager.ListProviders()[$Provier].Id
    $ResultSource.ConnectionUrlTemplate = $RemoteSharePointUrl
    $ResultSource.CreateQueryTransform($QueryTransform)
    $ResultSource.Commit()
    Add a new query rule
    In the Search Administration click on Query Rules
    Select Local SharePoint as Result Source
    Click New Query Rule
    Enter a Rule name f.g. Search results from SharePoint Online
    Expand the Context section
    Under Query is performed on these sources click on Add Source
    Select your SharePoint Online result source
    In the Query Conditions section click on Remove Condition
    In the Actions section click on Add Result Block
    As title enter Results for "{subjectTerms}" from SharePoint Online
    In the Search this Source dropdown select your SharePoint Online result source
    Select 3 in the Items dropdown
    Expand the Settings section and select "More" link goes to the following URL
    In the box below enter this Url https://[example].sharepoint.com/search/pages/results.aspx?k={subjectTerms}
    Select This block is always shown above core results and click the OK button
    Save the new query rule

    Hi  Janik,
    According to your description, my understanding is that you want to display hybrid search results in SharePoint Server 2013.
    For achieving your demand, please have a look at the article:
    http://technet.microsoft.com/en-us/library/dn197173(v=office.15).aspx
    If you are using single sign-on (SSO) authentication, it is important to test hybrid Search functionality by using federated user accounts. Native Office 365 user accounts and Active Directory Domain Services
    (AD DS) accounts that are not federated are not recognized by both directory services. Therefore, they cannot authenticate using SSO, and cannot be granted permissions to resources in both deployments. For more information, see Accounts
    needed for hybrid configuration and testing.
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Unable to open pdf files from search results page in Office 365 site

    Hi folks,
    I am getting this issue since a while now. In office 365 site, if I click on links that points to pdf files in search results page, I get this -
    “The filename, directory name, or volume label syntax is incorrect”. 
    These pdf files are stored in the same site and I am able to open them in adobe reader directly from the document library but not from the search results page.
    I have already gone this post and doesn't help me -
    https://social.msdn.microsoft.com/Forums/sharepoint/en-US/545efcc6-b748-4df8-aee0-7f57f778ad1e/sharepoint-2010-opening-pdfs-in-search-results-the-filename-directory-name-or-volume-label?forum=sharepointgeneralprevious
    Any help or pointer is much appreciated.
    Thanks,
    Manvir
    Manvir

    Hi,
    Besides pamma has suggested, here are similar issues, you can take a look at:
    http://unsolicitedbutoffered.blogspot.com/2014/01/quick-fix-volume-syntax-error-when.html
    http://crowdsupport.telstra.com.au/t5/T-Suite-Applications/There-was-an-error-opening-this-document-The-filename-directory/td-p/197425
    Best Regards,
    Lisa Chen
    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]
    Lisa Chen
    TechNet Community Support

Maybe you are looking for