huangfox

冰冻三尺,非一日之寒!

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

随笔分类 -  3-搜索引擎_Solr

上一页 1 2

摘要:在solr中有两种方式实现MoreLikeThis:MoreLikeThisHandler和在SearchHandler中的MoreLikeThisComponent。两种方式大同小异:一是:将MoreLikeThis作为一个单独的Handler来处理,体现主体地位。二是:将MoreLikeThis作为一个组件放到SearchHandler中,为Search加入了MLT的功能,是一种辅助功能。这里我们借助方法一,来简单阐述MLT的实现步骤。步骤1:MLT是根据一篇文档(document)的相关字段进行“相似匹配”,例如:http://localhost:8983/solr3.5/core0/m 阅读全文
posted @ 2012-03-09 11:07 huangfox 阅读(3790) 评论(0) 推荐(0) 编辑

摘要:1.对于“关注度排序问题”的记录在查阅资料是发现:ExternalFileField is handy for cases where you want to update a particular field in many documents more often than you want to update the rest of the documents. For example, suppose you have some kind of document rank based on number of views . You might want to update the r 阅读全文
posted @ 2012-02-15 09:59 huangfox 阅读(457) 评论(0) 推荐(0) 编辑

摘要:This story is part of the DZone Solr-Lucene Zone, which is brought to you in collaboration with the Solr/Lucene Community.Visit the Solr-Lucene Zonefor additional tutorials, videos, opinions, and other resources on this topic.Let’s talk about spellcheckers. A spellchecker, as you may know, is that d 阅读全文
posted @ 2012-02-14 13:46 huangfox 阅读(522) 评论(0) 推荐(0) 编辑

摘要:转载地址:http://knowlspace.wordpress.com/2011/06/15/different-ways-to-implement-autosuggest-using-solr/There are currently five techniques that can be used to create an auto-suggest functionality:1- The TermsComponent 2- Facet Prefixes 3- The new Suggester component 4- Edge N-Grams 5- Wildcard queries.T 阅读全文
posted @ 2012-02-14 11:26 huangfox 阅读(525) 评论(0) 推荐(0) 编辑

摘要:solrJ可以看成是solr的java版客户端,提供基本的索引维护、检索等功能。solrJ和solr服务端有两种“沟通”方式:第一,利用http进行通信。第二,直接访问solrCore(solr配置文件、索引文件等),不需要http通信(without http)。solrJ的SolrServer类结构如下图所示:EmbeddedSolrServer是第二种方式,CommonsHttpSolrServer,LBHttpSolrServer是第一种方式,其中LBHttpSolrServer是在CommonsHttpSolrServer的基础上提供了负载均衡的功能(load Balanced)。在 阅读全文
posted @ 2012-02-13 11:48 huangfox 阅读(13436) 评论(0) 推荐(0) 编辑

摘要:Distributed Searching基础在单机的情况下,当索引越来越大,检索就显得力不从心了。solr容许我们将索引切开(多个适当大小的索引,称之为shards),并分布到多台“服务器”上。solr通过一台服务器(single shard)接受检索任务,并将其分发到各个shards上,最后合并检索结果。详细信息参见:http://wiki.apache.org/solr/DistributedSearch1.通过shards参数执行Distributed Searching我们可以检索请求中加入shards参数执行Distributed Searching,其格式为:host:port/ 阅读全文
posted @ 2012-02-10 14:43 huangfox 阅读(1053) 评论(0) 推荐(0) 编辑

摘要:solr-searching过程分析(一)——searching过程粗略梳理下午看了一会solr的启动过程,往细的看相当繁琐。换个头绪先看看solr的searching过程。1.拦截请求,解析请求并构建相应的handler。发送检索请求,例如:http://localhost:8983/solr3.5/core2/select/?q=*%3A*&version=2.2&start=0&rows=10&indent=on首先他将被SolrDispatchFilter拦截。doFilter(ServletRequest request, ServletRespons 阅读全文
posted @ 2012-02-09 23:33 huangfox 阅读(3011) 评论(0) 推荐(0) 编辑

摘要:有时为了满足特有的需求,可能需要对现有的分词器进行调整,为了完成对这些特有分词器的配置,需要完成以下步骤。(基本思路和配置IKAnalyzer一致)1.开发特有的分词器,并继承solr中的类BaseTokenizerFactory。例如笔者调整了一个分词器为OBOLowercaseTokenizer类层次结构如下图:然后编写BOBSolr类,继承BaseTokenizerFactory。public class BOBSolr extends BaseTokenizerFactory { @Override public Tokenizer create(Reader input) { re. 阅读全文
posted @ 2012-02-08 16:48 huangfox 阅读(2391) 评论(1) 推荐(0) 编辑

摘要:http://www.cnblogs.com/huangfox/archive/2012/02/08/2342881.html一文中介绍的怎么将solr发布到eclipse中,现在就在原有的基础上将IKAnalyzer加入。1.下载IKAnalyzer的源码,将其复制到solr3.5项目中,如下图:2.在schema.xml配置IKAnalyzer<!-- IKAnalyzer3.2.8 中文分词--> <fieldType name="text" class="solr.TextField"> <analyzer type 阅读全文
posted @ 2012-02-08 16:37 huangfox 阅读(2050) 评论(0) 推荐(0) 编辑

摘要:将solr发布到eclipse当中,可以调试、修改,比较主动,也是自主学习solr的有效途径。环境:eclipse:Eclipse Java EE IDE for Web Developers.Tomcat 6.0.35部署步骤:1.新建【Dynamic Web project】项目2.删除WebContent下面的所有内容,并将apache-solr-3.5.0.war(下载dist文件夹中)所有内容复制到WebContent下面。(红叉除了碍眼,也没有什么!)3.指定solrHome在web.xml中添加以下内容<env-entry> <env-entry-name> 阅读全文
posted @ 2012-02-08 16:24 huangfox 阅读(4794) 评论(1) 推荐(0) 编辑

上一页 1 2