May 16 2017 07:09 AM
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!
May 16 2017 07:41 AM
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
May 16 2017 08:22 AM
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.
You can also modify a display template if you want to use a CSWP (recommended)
Hope that helps
Steve
May 16 2017 10:30 AM
SolutionHi 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
Sep 20 2017 06:01 AM
This ended up being the exact process I needed. Thank you!
May 16 2017 10:30 AM
SolutionHi 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