zoukankan      html  css  js  c++  java
  • 学习笔录一:ArachNode.Net1.2

    1、首先运行存储过程:dbo.arachnode_usp_arachnode.net_RESET_DATABASE或者从类 Arachnode.Console。Pragram.cs中执行

    ArachnodeDAO arachnodeDAO = new ArachnodeDAO();
    arachnodeDAO.ExecuteSql("EXEC [dbo].[arachnode_usp_arachnode.net_RESET_DATABASE]");

     _crawler.Crawl(new CrawlRequest(new Discovery("http://taobao.com"), int.MaxValue, UriClassificationType.Domain | UriClassificationType.FileExtension, UriClassificationType.Domain | UriClassificationType.FileExtension, 1));

    2、在SQL  Server 2008数据库中,对表cfg.Configuration执行如下一段代码:

    use [arachnode.net]
      update cfg.Configuration
      set Value = 'D:/LuceneDotNetIndex/Index'
      where [KEY] = 'LuceneDotNetIndexDirectory'
     
      update cfg.Configuration
      set Value = 'D:/LuceneDotNetIndex/DownloadedFiles'
      where [KEY] = 'DownloadedFilesDirectory'

      update cfg.Configuration
      set Value = 'D:/LuceneDotNetIndex/DownloadedImages'
      where [KEY] = 'DownloadedImagesDirectory'
     
      update cfg.Configuration
      set Value = 'D:/LuceneDotNetIndex/DownloadedWebPages'
      where [KEY] = 'DownloadedWebPagesDirectory'
     
      update cfg.Configuration
      set Value = 'D:/LuceneDotNetIndex/ConsoleOutputLogs'
      where [KEY] = 'ConsoleOutputLogsDirectory'

    3、将数据库中的表cfg.CrawlActions中的字段

    AutoCommit=true|LuceneDotNetIndexDirectory=D:/LuceneDotNetIndex/Index|CheckIndexes=false|RebuildIndexOnLoad=false|WebPageIDLowerBound=1|WebPageIDUpperBound=100000

     

    4、配制数据库的链接:

    Arachnode.Configuration中的

     connectionString="Data Source=HENRYWEN-TUCU/SQLEXPRESS;Initial Catalog=arachnode.net;Integrated Security=True;Connection Timeout=3600;"或者项目Function右键--属性--数据库--连接字符

    5、去掉开发工具(VS2008):look up turning off 'Just My Code' - this is a Visual Studio option

    工具--选项--调试--去掉启用仅我的代码

    附下载工具(SVN):TortoiseSVN

  • 相关阅读:
    C#yield return用法示例
    C#多线程示例
    AspNetCore.Authentication
    C#委托与事件
    按值和按引用传递参数
    基于iView的无限级菜单
    Sortable By Attribute
    未能加载文件或程序集“BLL”或它的某一个依赖项。生成此程序集的运行时比当前加载的运行时新,无法加载此程序集。
    有关导出Excel特殊字符的问题
    openFileDialog的使用
  • 原文地址:https://www.cnblogs.com/wenrenhua08/p/3993612.html
Copyright © 2011-2022 走看看