君子博学而日参省乎己 则知明而行无过矣

博客园 首页 新随笔 联系 订阅 管理

随笔分类 -  lucene.net&solr

上一页 1 2 3 4 5 6 7 下一页

摘要:创建并启动连接器实例之后,连接器就会基于Http协议向指定的数据接收服务器发送xmlfeed格式数据,我们可以通过配置http代理服务器抓取当前基于http协议格式的数据(或者也可以通过其他网络抓包工具抓取)// 设置代理 /Proxy proxy = new Proxy(Pr... 阅读全文
posted @ 2014-06-07 22:15 刺猬的温驯 阅读(733) 评论(0) 推荐(0) 编辑

摘要:本文描述连接器的提供与外界交互的servlet接口,连接器与外部是通过xml格式数据交互的1) 获取所有连接类型提交地址:http://localhost:8080/connector-manager/getConnectorList提交方式:GET返回数据: Google Search App... 阅读全文
posted @ 2014-05-18 16:38 刺猬的温驯 阅读(561) 评论(0) 推荐(0) 编辑

该文被密码保护。
posted @ 2014-01-08 21:27 刺猬的温驯 阅读(7) 评论(0) 推荐(0) 编辑

摘要:本文要描述的是solr的查询插件,该查询插件目的用于生成Lucene的查询Query,类似于查询条件表达式,与solr查询插件相关UML类图如下:如果我们强行将上面的类图纳入某种设计模式语言的话,本人姑且将之归入桥接模式(Bridge)吧;QParserPlugin插件的行为依赖于QParser的具... 阅读全文
posted @ 2014-01-07 11:55 刺猬的温驯 阅读(894) 评论(4) 推荐(0) 编辑

摘要:solr索引操作(包括新增 更新 删除 提交 合并等)相关UML图如下从上面的类图我们可以发现,其中体现了工厂方法模式及责任链模式的运用UpdateRequestProcessor相当于责任链模式中的处理器角色,我们通过如下的对象图也许更能反映多个UpdateRequestProcessor类型的处... 阅读全文
posted @ 2014-01-02 00:16 刺猬的温驯 阅读(504) 评论(0) 推荐(0) 编辑

摘要:Sometime back, I described how I built (among other things) a custom Solr QParser plugin to handle Payload Term Queries. Looking back on this recently, I realized how lame it was - all it could handle were single Payload Term Queries, and a one level deep AND and OR combinations of these queries. Mo 阅读全文
posted @ 2013-12-12 01:14 刺猬的温驯 阅读(564) 评论(0) 推荐(0) 编辑

摘要:I've been building some custom search components for SOLR lately, so wanted to share a couple of things I learned in the process. Most likely this is old hat to people who have been doing this for a while, but thought I'd share, just in case it benefits someone...Passing StateIn a previous p 阅读全文
posted @ 2013-12-12 01:09 刺猬的温驯 阅读(463) 评论(0) 推荐(0) 编辑

摘要:As you know, I've been playing with Solr lately, trying to see how feasible it would be to customize it for our needs. We have been a Lucene shop for a while, and we've built our own search framework around it, which has served us well so far. The rationale for moving to Solr is driven prima 阅读全文
posted @ 2013-12-12 01:07 刺猬的温驯 阅读(1324) 评论(0) 推荐(0) 编辑

摘要:上文描述了solr3.6.0怎么采用maven管理的方式在eclipse中搭建开发环境,在solr中,为了提高搜索性能,采用了缓存机制,这里描述的是LRU缓存,这里用到了LinkedHashMap类要基于LinkedHashMap来实现LRU缓存,我们可以选择inheritance, 也可以选择 d... 阅读全文
posted @ 2013-11-25 02:38 刺猬的温驯 阅读(406) 评论(0) 推荐(0) 编辑

摘要:本文作为系列的第一篇,主要描述的是solr3.6.0开发环境的搭建首先我们需要从官方网站下载solr的相关文件,下载地址为http://archive.apache.org/dist/lucene/solr/3.6.0/将下载的文件解压到solr-3.6.0文件夹然后本人在myeclipse下建立w... 阅读全文
posted @ 2013-11-25 00:06 刺猬的温驯 阅读(732) 评论(0) 推荐(0) 编辑

摘要: 阅读全文
posted @ 2013-09-07 22:31 刺猬的温驯 阅读(265) 评论(0) 推荐(0) 编辑

摘要:本人有一段时间没有接触企业搜索引擎之连接器的开发了,连接器是涉及企业搜索引擎一个重要的组件,在数据源与企业搜索引擎中间起一个桥梁的作用,类似于数据库之JDBC,通过连接器将不同数据源的数据适配到企业搜索引擎系统本文将描述怎样构建连接器应用实例,并开发一个简单的客户端进行测试我们先用myeclipse... 阅读全文
posted @ 2013-07-29 05:27 刺猬的温驯 阅读(910) 评论(0) 推荐(0) 编辑

摘要:大多数应用都必须具有某种搜索功能,问题是搜索功能往往是巨大的资源消耗并且它们由于沉重的数据库加载而拖垮你的应用的性能这就是为什么转移负载到一个外部的搜索服务器是一个不错的主意,Apache Solr是一个流行的开源搜索服务器,它通过使用类似REST的HTTP API,这就确保你能从几乎任何编程语言来... 阅读全文
posted @ 2013-06-20 00:41 刺猬的温驯 阅读(7277) 评论(8) 推荐(4) 编辑

摘要:Solris an open source search server which is built by using the indexing and search capabilities ofLucene Core, and it can be used for implementing scalable search engines with almost any programming language.Even though Solr has many advantages, setting up a a development environment is not one of 阅读全文
posted @ 2013-06-19 12:29 刺猬的温驯 阅读(2740) 评论(0) 推荐(0) 编辑

摘要:在solr的数据导入源码里面,DocBuilder类用于创建solr的Document,具体过程不在本文分析,最后调用SolrWriter类的对象执行SolrInputDocument doc对象的提交、修改、删除等操作本人先来分析一下SolrWriter对象的创建,在DataImportHandler类(数据导入请求处理)的void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp)方法里面UpdateRequestProcessorChain processorChain = req.g... 阅读全文
posted @ 2013-05-04 21:43 刺猬的温驯 阅读(2471) 评论(0) 推荐(0) 编辑

摘要:本文接下来分析EntityProcessor相关类,我们可以称之为实体处理器,针对不同的数据源有不同的实体处理器,屏蔽了不同数据源的差异本文只介绍针对数据库数据源的实体处理器,其他实体处理器类似EntityProcessor类为抽象类,定义了获取数据源的Map类型数据的方法(针对添加 修改 删除的数据)/** * <p> * An instance of entity processor serves an entity. It is reused throughout the * import process. * </p> * <p/> * <p& 阅读全文
posted @ 2013-05-04 14:05 刺猬的温驯 阅读(1989) 评论(0) 推荐(0) 编辑

摘要:去年本人写过一系列solr dataimport 数据导入源码分析,由于博客园系统存在一些问题,后来上传的相同名称的图片覆盖了原来的图片,导致原来文章里面的图片与其内容不符合,我这里重新整理一下,也同时更新一些心得solr dataimport 数据导入的全局UML类图如下(分两张,我的显示器不够大,显示器显示不完)从上面的UML类图看以看出,这里面是采取了装饰模式以及迭代子模式等我们首先来分析DataSource类,该类为抽象泛型类,定义了初始化数据源和获取泛型数据的方法/** * <p> * Provides data from a source with a given qu 阅读全文
posted @ 2013-05-04 13:12 刺猬的温驯 阅读(2468) 评论(0) 推荐(0) 编辑

摘要:现在再次回顾企业搜索引擎开发之连接器connector(三)中UML图示中的servlet类ConnectorManagerServlet类与ConnectorManagerGetServlet类均为抽象类,继承自HttpServlet类它们均提供了抽象方法,供子类具体实现,本身的servlet的override方法里面调用了各自的抽象方法,这种处理方式类似于template method模式,在它们的子类override方法里面有些通过调度处理器来执行具体逻辑,具体源码我这里不粘贴出来了这些servlet实现类部分用到了Manager类型的实例(ProductionManager实例),这个 阅读全文
posted @ 2013-03-20 01:47 刺猬的温驯 阅读(398) 评论(0) 推荐(0) 编辑

摘要:回顾Context类的start方法,还有一部分是启动调度器的方法/** * Start up the Scheduler. */ private void startScheduler() { traversalScheduler = (TraversalSchedu... 阅读全文
posted @ 2013-03-20 01:11 刺猬的温驯 阅读(307) 评论(0) 推荐(0) 编辑

摘要:本文分析一下ConnectorInterfaces类的代码,该类主要提供了访问连接器的相关依赖类的一下方法,供ConnectorCoordinatorImpl类调用,其源码如下:/** * Access to the AuthenticationManager, AuthorizationManager, and * TraversalManagager for a Connector instance. */public class ConnectorInterfaces { private final String connectorName; private final Connec.. 阅读全文
posted @ 2013-03-20 00:33 刺猬的温驯 阅读(318) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 下一页