Lucene.net站内搜索—4、搜索引擎第一版技术储备(简单介绍Log4Net、生产者消费者模式)
目录
Lucene.net站内搜索—1、SEO优化
Lucene.net站内搜索—2、Lucene.Net简介和分词
Lucene.net站内搜索—3、最简单搜索引擎代码
Lucene.net站内搜索—4、搜索引擎第一版技术储备(简单介绍Log4Net、生产者消费者模式)
Lucene.net站内搜索—5、搜索引擎第一版实现
Lucene.net站内搜索—6、站内搜索第二版
我们先来看下百度搜索
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAApYAAADkCAIAAACt5fO+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAADU/SURBVHhe7d0LtG11VT/w62OMGpaIckElSTNQEckHimWpqCiSGqFicgHDzOsAVBiamtIAuyqmBvggjSwF8YFgRob6TyXEtwE+EBVTu5YaIfIwtXywf/znWnPueeae8/f7rbX3Xvvcs8/5fsYa2/mbc67fWnvfffb0XM6BTTcDAADAEsIIBwAAWEoY4QAAAEsJIxwAAGApYYQDAAAsJYxwAACApYQRDgAAsJQwwgEAAJYSRjgAAMBSwggHAABYSsUR/v8AAAAGst8rbsbR8+ivNsIlWmPSddelr31t9JnPpI9+NH3oQ+nCC9N735vOPTe97W3pb/82vfGN6bWvTa9+dXr5y0enn06PTUwZylOVeqiT+uksOvejHx199rO0G+0puwMAwAK4KYWjcvS35kZ4uvrq9PGPj2jQnnZaeslL0tat6dBD00MfmvbeO+26a7rFLdLOO6c99xwddVSTfNSj0sEHp0MOSYcdlo44Ij396elZz0rPeU56/vPTi188OvVUemxiylCeqtRDndRPZ9G5D33o6GlPo92aPWnn3XZL9753etjD0hOf2FyXrn7aaaN3vYvuJ/33f8v9AQDA9NyUwlE5+tuRIzxdc036xCfSW9/aDMunPCXd//7pl3+5maMPecjohBPS8cenl70svelN6T3vab7hvvJKmqPpppvk5KHRzs3/e/jSl9LFF6fzz2+uS1c//vjmTh7ykOb/Pdz2ts0d0n2eeGI666zmzq+5Rk4GAIAqN6VwVI7+VnWEp+9+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3DCVcKxzbBSnlRKVqmtcnqlxLREgcXJqFIi2WpMckbzMYDVEN7qMLjcS5z7QLEByX4l1Bt6Vm1gaZIDwrHNsKY7JLPqnbYU23pWY5t9tChTIh1TcieW9uF8rE57XZpD9UP6DJss9bA+N0M93KbNmuGYA2KTGr96jz3Ss57FMeH7qRzSN34WmnFLFvstl6FbGj3jGemv/krvLau9d09qk2y+1GO1O3lSm2TznT2lBqfelq3GpM2UYli48FaHweVe4vCB4gISvxI6M7S0JDummRiQerLikpP223LWdlmM0YlM1jmx6jLtBiskO1bKtL0StOm8erUnt0l2zz43M5s4qKI+Pax0h6U/X33MLi1N0uMZu+8+OvlkzpDS7dm86ymVKLaHZMdshu5kdOKJr919d445mRWr2f7OtvgaDrUz4Yx97FRpK5ViXjOupEv7rEsxzCu81WFwuZd48nXnN339iyRWmS3ZHhdnS5xXmtGqZrK47ebtZ51U/oKUVm1uxYyyJdvjYrtkmuGgbRGar+O2qfBZfLpjGxjnnUrJ4jZVGlRRnx4WryLCn2/2lrJJwklbOm/XXdMf/iHH+kTiwQ1OzGvGllxsl3Qn6cgj07OfzXHEbUxSk6TWihk1USq8ho7UWjGjbMn2cN6R2qT++XaPhqwNTtpS25jfGRYlfEXA4HIv8Tp63asTHJbeIv5801veMtp553TqqbJeLek1r2n+Yydnny3r1YKvEVgUjPDFW+cjHGAGox/+MJ1wQrrDHUannZYuv1yyi5Euu6y5yu1ul573vNGPfyxZgHUAo2TxMMIB8tK11462bUv3u1+64x3TH/1Res970v/+r9Tmk37843T++enoo9Nuu6X733/08pen66+XGsC6gVGyeIURjgMHDhw4cMx5wILhJQaYQrroovT8548OPjjtvXfaZRf6kEqbNzfxwx+envzkdMwxzd+KH3NME1OG8ps3r/Q87nHpT/4k/cu/yF4AAPPBCAeYS7rmmnTllTSY07vfnc44oxnhZ5zRxJSh/DXXSB8AwNAwwgEAAJYSRjgAAMASuvnm/w+f4QxBiA015AAAAABJRU5ErkJggg==" alt="" />
用户保存一篇文章就把文章写入索引库
用户输入“我喜欢的季节”也可以搜索出含有“喜欢的”和“季节”的,这里用到了分词。query.Add(new Term("body',str))
搜索结果页面显示标题和帖子的一部分(帖子的前100个字)。点击标题可以进入帖子页面。我这里结果页面暂时不用分页。
英文搜索时要转换为小写的,因为盘古分词会默认把英文转化为小写保存。
面试可能会问的问题:Lucene.Net的原理:分词、B+树、索引。
如果搜索结果为空,看看是不是创建索引download下来的是乱码,因为如果download的是乱码,当然搜索不到
显示用Repeater,将搜索结果放到
public class SearchResultInfo
{
public string URL{get;set;}
public String Title { get; set; }
public String Summary { get; set; }
}
List< SearchResultInfo> list = new List< SearchResultInfo>();
repeater.DataSource=list;
把list绑定到Repeater,不考虑分页,设置一下Repeater的ItemTempelete
<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate><a href="Eval('URL')" /></ItemTemplate>
</asp:Repeater>
对象中,然后绑定到ListView中,其实用Repeater也可以
<asp:ListView ID="listResult" runat="server">
<ItemTemplate>
<p>
<a href="<%#Eval("URL") %>"><%#Eval("Title") %></a></p>
<p>
<%#Eval("Summary")%></p>
</ItemTemplate>
<LayoutTemplate>
<asp:PlaceHolder ID="itemPlaceholder" runat="server" />
</LayoutTemplate>
<EmptyDataTemplate>
<p>
No Result</p>
</EmptyDataTemplate>
</asp:ListView>
Log4Net
这里我简单介绍下Log4Net,因为后面用得到。
Log4Net是用来记录日志的,可以将程序运行过程中的信息输出到一些地方(文件、数据库、EventLog等),日志就是程序的黑匣子,可以通过日志查看系统的运行过程,从而发现系统的问题。日志的作用:将运行过程的步骤、成功失败记录下来,将关键性的数据记录下来分析系统问题所在。Log4J。
对于网站来讲,不能把异常信息显示给用户,异常信息只能记录到日志,出了问题把日志文件发给开发人员,就能知道问题所在。
Log4net的安装:
用户可以从http://logging.apache.org/log4net/下载log4net的源代码。解压软件包后,在解压的src目录下将log4net.sln载入Visual Studio .NET,编译后可以得到log4net.dll。用户要在自己的程序里加入日志功能,只需将log4net.dll引入工程即可。
配置Log4Net环境
- 新建一个WebApplication
- 添加对log4net.dll的引用(bin\net\2.0\release)
- 在Web.Config (或App.Config)添加配置,见备注
- 初始化:在程序最开始加入log4net.Config.XmlConfigurator.Configure();不要加到页面的Load
- 在要打印日志的地方LogManager.GetLogger(typeof(Program)).Debug("信息"); 。通过LogManager.GetLogger传递要记录的日志类类名获得这个类的ILog(这样在日志文件中就能看到这条日志是哪个类输出的了),然后调用Debug方法输出消息。因为一个类内部不止一个地方要打印日志,所以一般把ILog声明为一个static字段。
- 输出错误信息用ILog.Error方法,第二个参数可以传递Exception对象。log.Error("***错误"+ex),log.Error("***错误",ex)
- 测试代码:见下面。
log("准备执行数据库清理"+DateTime.Now);
try
{
clear();
log("清理成功"+DateTime.Now);
}
catch(Excepion ex)
{
log("清理失败"+DateTime.Now+ex);
}在VS2010中的控制台项目引用Log4Net的时候要将项目的“目标框架”改为非“Client Profile”
备注:
1、Log4Net配置
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
</configSections>
<log4net>
<!-- Define some output appenders -->
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="test.txt"/>
<appendToFile value="true"/>
<maxSizeRollBackups value="10"/>
<maximumFileSize value="1024KB"/>
<rollingStyle value="Size"/>
<staticLogFileName value="true"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline"/>
</layout>
</appender>
<root>
<level value="DEBUG"/>
<appender-ref ref="RollingLogFileAppender"/>
</root>
</log4net>
</configuration>2、完整示例
class Program
{
private static ILog log = LogManager.GetLogger(typeof(Program));
static void Main(string[] args)
{
log4net.Config.XmlConfigurator.Configure();
log.Debug("开始运行");
string s = Console.ReadLine();
log.Debug("用户输入:"+s);
try
{
int i = Convert.ToInt32(s);
}
catch (Exception ex)
{
log.Error("用户输入的数据错误:" + s, ex);
}
Console.ReadKey();
log.Debug("程序退出");
}生产者消费者模式
生产者、消费者模式:生产者、消费者不用互相等待,用仓库做缓冲。简单原理性代码见备注
- 举例:多线程操作同一个文件时会出现并发问题。解决的一个办法就是给文件加锁(lock),但是这样的话,一个线程操作文件时,其它的都得等待,这样的话性能非常差。另外一个解决方案,就是先将数据放在队列中,然后开启一个线程,负责从队列中取出数据,再写到文件中。
因为同时只能有一个线程对索引库进行写操作,所以以一种策略(联想火车中等厕所可用,红灯/绿灯就是标志是否有人在用)是一直检测是否厕所可用,带来的问题就是效率低;另外一种策略就是委托给乘务员排队处理,这样就可以去干别的。
队列(先入先出):Queue、ConcurrentQueue(*线程安全,多线程中用这个)。栈(*):Stack:先进后出。
发邮件、发短信偶尔会遇到半个小时才收到的情况就是在排队处理。
Demo:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
namespace 生产者消费者模式
{
class Program
{
//仓库
static List<int> list = new List<int>();
static void Main(string[] args)
{
//while (true)
//{
// Console.WriteLine("请输入一个数字");
// int i = Convert.ToInt32(Console.ReadLine());
// 耗时操作.Process(i);
//}
//消费线程
Thread thread = new Thread(ThreadRun);
thread.Start();
//生产线程
while (true)
{
Console.WriteLine("请输入一个数字");
int i = Convert.ToInt32(Console.ReadLine());
list.Add(i);//把任务放入仓库
}
}
static void ThreadRun()
{
while (true)
{
//如果仓库中有产品,就消费
if (list.Count > )
{
int i = list[];//有线程安全问题
list.RemoveAt();//消费完毕后从仓库移除
Thread.Sleep(5000);//模拟耗时操作.Process(i);
}
}
}
}
}
Lucene.net站内搜索—4、搜索引擎第一版技术储备(简单介绍Log4Net、生产者消费者模式)的更多相关文章
- Lucene.net站内搜索—5、搜索引擎第一版实现
目录 Lucene.net站内搜索—1.SEO优化 Lucene.net站内搜索—2.Lucene.Net简介和分词Lucene.net站内搜索—3.最简单搜索引擎代码Lucene.net站内搜索—4 ...
- Lucene.net站内搜索—3、最简单搜索引擎代码
目录 Lucene.net站内搜索—1.SEO优化 Lucene.net站内搜索—2.Lucene.Net简介和分词Lucene.net站内搜索—3.最简单搜索引擎代码Lucene.net站内搜索—4 ...
- Lucene.net站内搜索—6、站内搜索第二版
目录 Lucene.net站内搜索—1.SEO优化 Lucene.net站内搜索—2.Lucene.Net简介和分词Lucene.net站内搜索—3.最简单搜索引擎代码Lucene.net站内搜索—4 ...
- Lucene.net站内搜索—2、Lucene.Net简介和分词
目录 Lucene.net站内搜索—1.SEO优化 Lucene.net站内搜索—2.Lucene.Net简介和分词Lucene.net站内搜索—3.最简单搜索引擎代码Lucene.net站内搜索—4 ...
- Lucene.net站内搜索—1、SEO优化
目录 Lucene.net站内搜索—1.SEO优化 Lucene.net站内搜索—2.Lucene.Net简介和分词Lucene.net站内搜索—3.最简单搜索引擎代码Lucene.net站内搜索—4 ...
- Lucene.Net 站内搜索
Lucene.Net 站内搜索 一 全文检索: like查询是全表扫描(为性能杀手)Lucene.Net搜索引擎,开源,而sql搜索引擎是收费的Lucene.Net只是一个全文检索开发包(只是帮我们 ...
- Lucene.net站内搜索-最简单搜索引擎代码
Lucene.Net核心类简介 先运行写好的索引的代码,再向下讲解各个类的作用,不用背代码. (*)Directory表示索引文件(Lucene.net用来保存用户扔过来的数据的地方)保存的地方,是抽 ...
- 百度站内搜索https不可用切换api搜索,加上谷歌api站内搜索
google推https几年了,百度开始宣传全面https,但是,百度站内搜索 自己的服务却不走https,接口报错.百度分享也是. 然后采用http://search.zhoulujun.cn/cs ...
- 基于lucene.net 和ICTCLAS2014的站内搜索的实现1
Lucene.net是一个搜索引擎的框架,它自身并不能实现搜索.须要我们自己在当中实现索引的建立,索引的查找.全部这些都是依据它自身提供的API来实现.Lucene.net本身是基于java的,可是经 ...
随机推荐
- ThinkPHP5 隐藏接口里面的index.php
隐藏index.php 官方介绍是这样的:http://www.kancloud.cn/thinkphp/thinkphp5_quickstart/145250 可以去掉URL地址里面的入口文件ind ...
- js对象、数组转换字符串
对象转换成字符串需要使用toString()方法. 1 var a = function(){ 2 console.log(111); 3 }; 4 var b = a.toString(); 5 c ...
- Topology Shapes of OpenCascade BRep
Topology Shapes of OpenCascade BRep eryar@163.com 摘要Abstract:通过对OpenCascade中的BRep数据的读写,理解边界表示法的概念及实现 ...
- poj 3321 Apple Trie
/* poj 3321 Apple Trie 这道题的关键是如何将一个树建成一个一维数组利用树状数组来解题! 可以利用dfs()来搞定,我们在对一个节点深搜后,所经过的节点的数目就是该节点的子树的数目 ...
- 一个在ASP.NET中利用服务器控件GridView实现数据增删改查的例子
备注:这是我辅导的一个项目开发组的一个例子,用文章的方式分享出来,给更多的朋友参考.其实我们这几年的项目中,都不怎么使用服务器控件的形式了,而是更多的采用MVC这种开发模式.但是,如果项目的历史背景是 ...
- Java多线程系列--“基础篇”01之 基本概念
多线程是Java中不可避免的一个重要主体.从本章开始,我们将展开对多线程的学习.接下来的内容,是对“JDK中新增JUC包”之前的Java多线程内容的讲解,涉及到的内容包括,Object类中的wait( ...
- Java Management extentsions(jmx)与tomcat
1,概念:一个可以使用JMX管理器来管理的Java对象称为JMX管理资源(JMX manageable resource).事实上,一个JMX管理资源也可以是一个应用程序.一个实现或者一个服务.设备. ...
- Gumby – 基于 Sass 的灵活的,响应式 CSS 框架
Gumby 框架是一个基于 SASS 的灵活的,响应式的 CSS 框架.可以借助其灵活,响应式的网格系统和 UI 套件快速创建逻辑的页面布局和应用程序原型. 您可能感兴趣的相关文章 35个让人惊讶的 ...
- 对于MVC中应用百度富文本编辑器问题的解决办法
1.对于应用富文本编辑器post提交表单内容提示有危险的解决办法: [ValidateInput(false)] //文本编辑器的表单提交不用提示危险 [HttpPost] public Action ...
- SQL Server代理(12/12):多服务器管理
SQL Server代理是所有实时数据库的核心.代理有很多不明显的用法,因此系统的知识,对于开发人员还是DBA都是有用的.这系列文章会通俗介绍它的很多用法. 在这一系列的上一篇,我们查看了维护计划,一 ...