Question

LetsSharePoints on Tue, 15 Jan 2013 23:55:20


Hello Everyone,

I am currently working to create a site that incorporates SQL server data to be accessed and searched via the BCS framework.

I have successfully implemented the appropriate tables which both come from the same SQL Server DB. I have created two different external lists based on the two different tables.

Now, when I set up the Search scope, you are able to point it to one External Data Source (holding both ECTs/Lists). After crawling and performing a BCS search, it returns the Profiles/data that include the search keyword regardless of which ECT/List it came from.

Now, How do I Scope ECTs in a BCS Search?

Ideally, I'd be able to set up a dropdown scope (much like the SharePoint data) on the same search box, however I don't seem to see that option when setting up the BCS Search Site or see it in any configuration/articles I have read.

I feel like this would be feasible if there was a way to designate/distinguish the BCS data, is there a way to achieve this?

Thank You! 


Sponsored



Replies

S K U L L on Wed, 16 Jan 2013 02:35:50


Create a search scope in central admin > search service application.

While defining the scope, create a RULE to include only the items from the BCS content source assuming you have already created a content source pointing to the required BCS external content type for search crawling.

unknown account holder on Wed, 16 Jan 2013 03:25:16


In this article you will solve all your problem...
Steps Involved:

  • Create a new content source
  • Start the full crawl
  • Create a new search scope
  • Create a new search center site and configure the search scopes
  • Search for a data from the external content type

Create a new content source:

  • Go to Central Administration => Application Management => Manage service applications => Search Service Application => Crawling => Content Sources.
     
  • Click on "New Content Source".

    1.gif
     
  • Enter the Name, and select "Line of Business data" option in the Content Source Type section.

    2.gif
     
  • In the External Data Source section, select "Business Data Connectivity Service" from the drop down and select "Crawl selected external data source".
  • Click on Ok.
  • A new content source is created successfully.

    3.gif


Start the full crawl:

  • Go to Central Administration => Application Management => Manage service applications => Search Service Application => Crawling => Content Sources.
  • Select BCS, go to the ECB menu and click on Start Full crawl.

    4.gif

Create a new search scope:

  • Go to Central Administration => Application Management => Manage service applications => Search Service Application => Queries and Results => Scopes.

    5.gif
     
  • Click on New Scope.

    6.gif
     
  • Enter the Title and click Ok.

    7.gif
     
  • A new scope is created successfully.
  • Click on "Add Rules".

    8.gif
     
  • In the "Scope Rule Type" section, select Content Source option.
  • In the "Content Source" section, select BCS from the drop down.

    9.gif
  • Click on Ok.

    10.gif

     
  • It will be updated after a particular interval, if you want update now go to Administration => Search Administration => System Status =>Scopes needing update => click on "Start update now".

    11.gif
     
  • Refresh the page until the scope update process completes.

    12.gif

Create a new search center site and configure the search scopes:

  • Open the SharePoint site.
  • Go to Site Actions => New Site =>All categories => Search.

    13.gif
     
  • Select Basic Search Center template.
  • Enter the Name and URL name.

    14.gif
     
  • Click on Create.
  • Go to the root level site.
  • Go to Site Actions => Site Settings =>Site Collection Administration => Search settings.

    15.gif
     
  • In the "Site Collection search center" section, select Enable custom scopes option and enter the basic search center URL that we have created.

    16.gif
     
  • Click on Ok.
  • Go to Site Actions => Site Settings =>Site Collection Administration => Search scopes.
  • Click on Display Groups.

    17.gif
     
  • Select BCS and I have made the BCS as a default scope.

    18.gif
     
  • Click on Ok.

Search for a data from the external content type:

  • Go to the root site and if you see by default in the search scope dropdown list BCS will be selected.

    19.gif
     
  • Enter a search term that will return the result from the external content type.

    20.gif

LetsSharePoints on Fri, 18 Jan 2013 21:12:19


Hello,

Thank for your input, however the methods you specified only search ALL the lists in External Data connected through BCS.
I am looking for a granular search depending on the list.

For the curious, I have found the method applies well here as stated in the following website.

Create Granular List Search

Basically, you 

  1. Go to Central Admin
  2. Create new content source
  3. Crawl Data (BCS/SQL tables)
  4. Create New Managed Metadata Property mapped to the column of the list you want to search (such as the name column of the specified). This column will be defined when you set up an ECT in SPD2010
  5. Modify the properties of the Advanced search box to include the PropertyDef of the metadata property you just created

This will allow you to do an advanced search that will only search the column you mapped in Step 4.  This yields only the results of that list. Although the search only works for the Name (or Column you mapped), I'm okay with that. (Or you could add in more columns and metadata properties, you user just has to know what column its searching and what to input)

Again, thanks for the help and hope this may help someone else!