摘要: lucene学习教程1.1 什么是lucene Lucene是一个全文搜索框架,而不是应用产品。因此它并不像www.baidu.com 或者google Desktop那么拿来就能用,它只是提供了a56爆大奖在线娱乐工具让你能实现这些产品。2 lucene的工作方式 lucene提供的服务实际包含两部分:一入一出。所谓入是写入,即将你提供的源(本质是字符串)写入索引或者将其从索引中删除;所谓出是读出,即向用户提供全文搜索服务,让用户可以通过关键词定位源。2.1写入流程 源字符串首先经过analyzer处理,包括:分词,分成一个个单词;去除stopword(可选)。将源中需要的信息加入Document的各个Fi 阅读全文
posted @ 2013-05-06 20:08 冰深 阅读(658) 评论(0) 推荐(0) 编辑
摘要: lucene.net配合盘古分词实现中文站内搜索,首先配置好盘古分词的Dict目录,将其放在项目下,文件夹下的所有文件输出到bin文件。 lucene.net下使用的代码:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Threading;using Lucene.Net.Store;using Lucene.Net.Index;using System.IO;using log4net;using Lucene.Net.Analysis.PanGu... 阅读全文
posted @ 2013-05-06 14:17 冰深 阅读(293) 评论(0) 推荐(0) 编辑
摘要: 用这种多线程的方式也可以实现安全操作主线程的控件。 private void Form1_Load(object sender, EventArgs e) { Thread t = new Thread(Take); t.IsBackground=true; t.Start(); } private void btnGenerate_Click(object sender, EventArgs e) { list.Add(txtLog.T... 阅读全文
posted @ 2013-05-06 09:26 冰深 阅读(363) 评论(0) 推荐(0) 编辑