huangfox

冰冻三尺,非一日之寒!

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

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

1 2 下一页

摘要:Distributed Result Grouping Caveats Grouping is supported distributed searches, with some caveats: 1)Currently group.func is not supported in any dist 阅读全文
posted @ 2016-06-08 17:20 huangfox 阅读(205) 评论(0) 推荐(0) 编辑

摘要:solr+python -> 数据可视化 阅读全文
posted @ 2016-05-13 11:06 huangfox 阅读(1200) 评论(0) 推荐(0) 编辑

摘要:1.参数cleanclean: (default 'true'). Tells whether to clean up the index before the indexing is started.clean如果为false:则不会删除老索引中的数据,但是会更新数据(根据id进行判断)例如:数据... 阅读全文
posted @ 2015-04-15 10:17 huangfox 阅读(456) 评论(0) 推荐(0) 编辑

摘要:http://stackoverflow.com/questions/20233837/importing-multi-valued-field-into-solr-from-mysql-using-solr-data-import-handlerQ:We have the following tw... 阅读全文
posted @ 2015-03-31 16:52 huangfox 阅读(676) 评论(0) 推荐(0) 编辑

摘要:What is SolrCloud?(And how does it compare to master-slave?)SolrCloud is a set of new features and functionality added in Solr 4.0 to enable a new way... 阅读全文
posted @ 2015-03-18 15:50 huangfox 阅读(1111) 评论(0) 推荐(0) 编辑

摘要:LBHttpSolrServer or "Load BalancedHttpSolrServer" is just a wrapper toCommonsHttpSolrServer. This is useful when you have multiple SolrServers and que... 阅读全文
posted @ 2015-03-18 14:55 huangfox 阅读(574) 评论(0) 推荐(0) 编辑

摘要:SolrServer实现类HttpSolrServerHttpSolrServer uses the Apache Commons HTTPClient to connect to solr.HttpSolrServer is thread-safe and if you are using the... 阅读全文
posted @ 2015-03-18 14:46 huangfox 阅读(955) 评论(0) 推荐(0) 编辑

摘要:“Hard commits are about durability, soft commits are about visibility“Transaction Logs首先介绍下solrcloud的index流程。1)update请求发送给任意节点(NodeA)。2)若该节点不是leader,将... 阅读全文
posted @ 2015-03-12 20:09 huangfox 阅读(617) 评论(0) 推荐(0) 编辑

摘要:SolrQuerySyntaxhttp://wiki.apache.org/solr/SolrQuerySyntaxsolr的处理方式:https://svn.apache.org/repos/asf/lucene/dev/trunk/solr/solrj/src/java/org/apache/s... 阅读全文
posted @ 2014-12-29 14:54 huangfox 阅读(1838) 评论(0) 推荐(0) 编辑

摘要:原文地址http://wiki.apache.org/solr/DocValuesDocValues从Lucene4.2和Solr4.2开始加入,通过建立字段的正排索引,提升sorting, faceting, grouping, function queries等性能。介绍在Solr的配置文件(s... 阅读全文
posted @ 2014-12-23 23:27 huangfox 阅读(531) 评论(0) 推荐(0) 编辑

摘要:http://tech.meituan.com/pinyin-suggest.html---------------------------------------------------------------------快照:问题背景搜索关键字智能提示是一个搜索应用的标配,主要作用是避免用户输入... 阅读全文
posted @ 2014-12-05 16:27 huangfox 阅读(12819) 评论(1) 推荐(2) 编辑

摘要:结合网上的资料,抄袭了几张图,记录下。1.solrcloud-collection/shard/replica1.Replica、Leader是core的角色,在index、search的过程中作用不同。2.不同shard尽量分布在不同的solr节点上。solr上的core尽量分布“均匀”,确保负载... 阅读全文
posted @ 2014-12-04 18:00 huangfox 阅读(1115) 评论(0) 推荐(0) 编辑

摘要:Whenever a commit happens in Solr, a new "searcher" (with new caches) is opened, "warmed" up according to yourSolrConfigXmlsettings, and then put in p... 阅读全文
posted @ 2014-12-03 11:05 huangfox 阅读(584) 评论(0) 推荐(0) 编辑

摘要:需求:商品排序,无库存的商品排在后面(排序)。搜索:默认搜索: df: 可以看出左图第1个、第6个库存为0.现在的需求是想将这两个库存为0的商品排在最后面。edismax-》bf:product(map(store,1,9999999,1),100),效果... 阅读全文
posted @ 2014-10-22 21:02 huangfox 阅读(5493) 评论(1) 推荐(0) 编辑

摘要:一.Query参数1.CoreQueryParam查询的参数1)q:查询字符串,必须的。2)q.op:覆盖schema.xml的defaultOperator(有空格时用"AND"还是用"OR"操作逻辑),一般默认指定。3)df:默认的查询字段,一般默认指定。4)qt:querytype,指定查询使... 阅读全文
posted @ 2014-10-22 15:22 huangfox 阅读(9727) 评论(0) 推荐(1) 编辑

摘要:在某些场景需要做自定义排序(非单值字段排序、非文本相关度排序),除了自己重写collect、weight,可以借助CustomScoreQuery。场景:根据tag字段中标签的数量进行排序(tag字段中,标签的数量越多得分越高)public class CustomScoreTest { pu... 阅读全文
posted @ 2014-09-03 20:58 huangfox 阅读(2593) 评论(0) 推荐(1) 编辑

摘要:No live SolrServers available to handle this request ,no servers hosting shard当某一片索引对应的结点全部宕了以后,会报这个异常。"error": { "msg": "no servers hosting shard:... 阅读全文
posted @ 2014-08-26 16:49 huangfox 阅读(4561) 评论(0) 推荐(0) 编辑

摘要:环境搭建一.zookeeper参考:http://blog.chinaunix.net/uid-25135004-id-4214399.html现有4台机器 10.14.2.201 10.14.2.202 10.14.2.203 10.14.2.204安装zookeeper集群 在所有机器上进行1、... 阅读全文
posted @ 2014-08-18 19:55 huangfox 阅读(12863) 评论(2) 推荐(0) 编辑

摘要:ES不支持groupby,于是想看看solr怎么实现的。搭建环境:1)下载tomcat7、solr4.9,解压;2)配置tomcat7的端口和URIEncoding(utf-8);3)拷贝solr\dist\solr-4.9.0.war至tomcat\webapps,并更名为solr.war;4)重... 阅读全文
posted @ 2014-08-04 00:03 huangfox 阅读(2252) 评论(0) 推荐(0) 编辑

摘要:solr在lucene外边做了一层厚厚的封装,主要是为了简化二次开发,提供了一些成熟的解决方案。solr和solrCoresolr可以对多个core进行综合管理,并接受请求选择特定的一个或者多个core执行相关任务。下面来回答什么是solr的core。core从文件结构的角度来看的话,主要包括一份索引(也可能还包括拼写检查的索引)、一堆配置文件。最主要的配置文件是:solrconfig.xml和schema.xml。solrconfig.xml从整体上对core进行了配置,例如索引的存放路径、字段的最大长度(maxFiedlLength)、写锁的超时时间(writeLockTimeout)、锁 阅读全文
posted @ 2012-08-07 17:28 huangfox 阅读(8875) 评论(5) 推荐(1) 编辑

1 2 下一页