Pregunta

Tengo la necesidad de definir mediante programación un origen de contenido de datos profesionales en SharePoint 2010 usando C # 2010. He revisado maneras de hacer esto desde dentro administración central, y he visto fragmentos de MOSS 2007. Sin embargo, no he localizado ejemplos de hacer esto en SP 2010. Puede alguien novillo mí en la dirección correcta?

Gracias por su ayuda y orientación.

¿Fue útil?

Solución

Esta debe ayudarle.

Otros consejos

Uso de la API

        string strURL = "http://mySiteUrl";
        SearchContext searchContext;
        using (SPSite searchSite = new SPSite(strURL))
        {
            searchContext = SearchContext.GetContext(searchSite);
        }
        Content sspContent = new Content(searchContext);
        ContentSourceCollection sspContentSources = sspContent.ContentSources;
        BusinessDataContentSource bdcs = (BusinessDataContentSource)sspContentSources.Create(typeof(BusinessDataContentSource), "MyBdcContentSource");
        bdcs.StartAddresses.Add(BusinessDataContentSource.ConstructStartAddress("Default", new Guid("00000000-0000-0000-0000-000000000000"), "LOBSystemName", "LOBSystemInstanceName"));

Uso de Powershell

$searchapp = Get-SPEnterpriseSearchServiceApplication "My Search Service Application Name"
$lobSystems = @("LOBSystemName1","LOBSystemNameInstance1")
$proxyGroup = Get-SPServiceApplicationProxyGroup -default
New-SPEnterpriseSearchCrawlContentSource -name "My Content Source Name" -searchapplication $searchApp -Type Business -LOBSystemSet $lobSystems -BDCApplicationProxyGroup $proxyGroup
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top