Forum Discussion

David Zimmer's avatar
David Zimmer
Copper Contributor
May 16, 2017
Solved

SharePoint 2013 BCS and the Search Service App

I recently implemented a BCS in our SharePoint environment that allows our search service app to crawl content that lives on a 3rd party system. That seems to be finally working, but now I want to create a search page or web part that only returns content from that BCS info.

 

I've played with Result Sources and the query transform but haven't had any luck. I'm not sure if I need to do more up in the Central Admin area, or if the narrowing of search data should happen down on the site level through Site Settings --> Search.

 

Hoping someone can point me in the direction of a good resource. My googling is failing me this morning. Thanks!

  • Hi David,

     

    I am assuming that you have created Content Source as Line of Business Data. if not then follow the Steps

     

    1) Go to SSA

    2) Click on Content Source

    3) Name it "BCS" 

    4) Select Live of Business Data

    5) Select "Crawl selected external data source"

    6) Check your External Data Source

    7) OK & Full crawl (Note: Make sure you get Success in the Crawl Log if not then fix those issues)

    8) once you done with crawl Create new Site or go to exsiting site where you want to add search web part

    9) Go to Site Setting --> Resualt Source --> Create New Result Source--> 

    10) Enter Name of the source CustomSearch

    11) in Query Transform  copy this line {searchTerms} ContentSource:BCS  Note: BCS is source name which created in Step 3 --> Save

    12) Now Edit your Search Page 

    13) edit your Search Result web Part --> Change Query

    14) on the Basic tab Select a Queary DropDown "CustomSearch" Which we created on Step 10 now Click okay

    15) Okay

    16) Save Page and Try to Search any Keyword

     

    Let me know if this work for you or not

     

    Best

    Sunit Patil

    Skype ID: Sunitonline 

4 Replies

  • Sunit Patil's avatar
    Sunit Patil
    Brass Contributor

    Hi David,

     

    I am assuming that you have created Content Source as Line of Business Data. if not then follow the Steps

     

    1) Go to SSA

    2) Click on Content Source

    3) Name it "BCS" 

    4) Select Live of Business Data

    5) Select "Crawl selected external data source"

    6) Check your External Data Source

    7) OK & Full crawl (Note: Make sure you get Success in the Crawl Log if not then fix those issues)

    8) once you done with crawl Create new Site or go to exsiting site where you want to add search web part

    9) Go to Site Setting --> Resualt Source --> Create New Result Source--> 

    10) Enter Name of the source CustomSearch

    11) in Query Transform  copy this line {searchTerms} ContentSource:BCS  Note: BCS is source name which created in Step 3 --> Save

    12) Now Edit your Search Page 

    13) edit your Search Result web Part --> Change Query

    14) on the Basic tab Select a Queary DropDown "CustomSearch" Which we created on Step 10 now Click okay

    15) Okay

    16) Save Page and Try to Search any Keyword

     

    Let me know if this work for you or not

     

    Best

    Sunit Patil

    Skype ID: Sunitonline 

    • David Zimmer's avatar
      David Zimmer
      Copper Contributor

      This ended up being the exact process I needed. Thank you!

  • As mentioned above, it requires modification to your display template to display those fields in a CSWP, but before that be sure to go to CA, Search Admin and create your search schema

     

    Create new managed properties pointing to the columns exposed by the BDC service. Allows refinement properties in search results to be used for the external columns.

     

    Here is a good article covering the entire topic - this one shows creating the search schema and then using the refinement webpart.

    https://blogs.metrostarsystems.com/2014/03/17/sharepoint-2013-business-connectivity-services-search-and-profile-page-demo-part-3-of-3/

     

    You can also modify a display template if you want to use a CSWP (recommended)

    https://blogs.metrostarsystems.com/2015/09/25/sharepoint-2013-business-connectivity-services-create-a-display-template-for-a-result-source-or-result-type-bonus-part-of-3/

     

    Hope that helps

    Steve

  • Pedro Marques's avatar
    Pedro Marques
    Copper Contributor

    HI David, how are you?

     

    I've done this kind of customization. I used Result Source WebPart filtering by BCS Content Type. For showing the results I created a custom DisplayTemplate.It's works fine

Resources