• SharePoint可以全文爬网的文件类型


    要获取MOSS的全文爬网类型,进入管理中心,点击进入搜索服务,链接地址如下:

    http://sps2010:9000/searchadministration.aspx?appid=60245e13-6af0-4a51-8052-b036ea0a6849

    拷贝"appid=”后面的部分,与代码中的GUID对应,代码如下,这样就会读取到可被全文爬网的文档类型

    Guid searchApplicationId = new Guid("60245e13-6af0-4a51-8052-b036ea0a6849");
                        bool cached = false;
                        SearchServiceApplication serviceApplication = SearchService.Service.SearchApplications.GetValue<SearchServiceApplication>(searchApplicationId);
                        if ((SPPersistedObject)serviceApplication != (SPPersistedObject)null && !cached)
                            serviceApplication = serviceApplication.Clone() as SearchServiceApplication;
                        Microsoft.Office.Server.Search.Administration.Content content = new Microsoft.Office.Server.Search.Administration.Content(serviceApplication);
                   

                        List<string> list = new List<string>();
                        foreach (Extension extension in content.ExtensionList)
                            list.Add(extension.FileExtension);
                        string[] array = list.ToArray();
                        Array.Sort<string>(array);
                        DataTable dataTable = new DataTable();
                        dataTable.Locale = CultureInfo.InvariantCulture;
                        dataTable.Columns.Add(new DataColumn("Extension"));
                      
                        foreach (string str in array)
                        {
                            DataRow row = dataTable.NewRow();
                            row["Extension"] = (object)str;
                          
                            dataTable.Rows.Add(row);
                        }
                        this.gridView.DataSource = (object)dataTable;
                        this.gridView.DataBind();

  • 相关阅读:
    java继承
    java构造器
    java接口
    java 泛型详解---转载
    java竞争抢答器
    java并发资源访问_01
    java多线程数字加减
    java多线程计算机流水线模型
    Java并发编程:Callable、Future和FutureTask---转载测试
    购物车
  • 原文地址:https://www.cnblogs.com/lxfl2/p/2675358.html
Copyright © 2020-2023  润新知