摘要:Distributed Result Grouping Caveats Grouping is supported distributed searches, with some caveats: 1)Currently group.func is not supported in any dist
阅读全文
随笔分类 - 3-搜索引擎_Solr
摘要:solr+python -> 数据可视化
阅读全文
摘要:1.参数cleanclean: (default 'true'). Tells whether to clean up the index before the indexing is started.clean如果为false:则不会删除老索引中的数据,但是会更新数据(根据id进行判断)例如:数据...
阅读全文
摘要:http://stackoverflow.com/questions/20233837/importing-multi-valued-field-into-solr-from-mysql-using-solr-data-import-handlerQ:We have the following tw...
阅读全文
摘要: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...
阅读全文
摘要:LBHttpSolrServer or "Load BalancedHttpSolrServer" is just a wrapper toCommonsHttpSolrServer. This is useful when you have multiple SolrServers and que...
阅读全文
摘要:SolrServer实现类HttpSolrServerHttpSolrServer uses the Apache Commons HTTPClient to connect to solr.HttpSolrServer is thread-safe and if you are using the...
阅读全文
摘要:“Hard commits are about durability, soft commits are about visibility“Transaction Logs首先介绍下solrcloud的index流程。1)update请求发送给任意节点(NodeA)。2)若该节点不是leader,将...
阅读全文
摘要:SolrQuerySyntaxhttp://wiki.apache.org/solr/SolrQuerySyntaxsolr的处理方式:https://svn.apache.org/repos/asf/lucene/dev/trunk/solr/solrj/src/java/org/apache/s...
阅读全文
摘要:原文地址http://wiki.apache.org/solr/DocValuesDocValues从Lucene4.2和Solr4.2开始加入,通过建立字段的正排索引,提升sorting, faceting, grouping, function queries等性能。介绍在Solr的配置文件(s...
阅读全文
摘要:http://tech.meituan.com/pinyin-suggest.html---------------------------------------------------------------------快照:问题背景搜索关键字智能提示是一个搜索应用的标配,主要作用是避免用户输入...
阅读全文
摘要:结合网上的资料,抄袭了几张图,记录下。1.solrcloud-collection/shard/replica1.Replica、Leader是core的角色,在index、search的过程中作用不同。2.不同shard尽量分布在不同的solr节点上。solr上的core尽量分布“均匀”,确保负载...
阅读全文
摘要:Whenever a commit happens in Solr, a new "searcher" (with new caches) is opened, "warmed" up according to yourSolrConfigXmlsettings, and then put in p...
阅读全文
摘要:需求:商品排序,无库存的商品排在后面(排序)。搜索:默认搜索: df: 可以看出左图第1个、第6个库存为0.现在的需求是想将这两个库存为0的商品排在最后面。edismax-》bf:product(map(store,1,9999999,1),100),效果...
阅读全文
摘要:一.Query参数1.CoreQueryParam查询的参数1)q:查询字符串,必须的。2)q.op:覆盖schema.xml的defaultOperator(有空格时用"AND"还是用"OR"操作逻辑),一般默认指定。3)df:默认的查询字段,一般默认指定。4)qt:querytype,指定查询使...
阅读全文
摘要:在某些场景需要做自定义排序(非单值字段排序、非文本相关度排序),除了自己重写collect、weight,可以借助CustomScoreQuery。场景:根据tag字段中标签的数量进行排序(tag字段中,标签的数量越多得分越高)public class CustomScoreTest { pu...
阅读全文
摘要:No live SolrServers available to handle this request ,no servers hosting shard当某一片索引对应的结点全部宕了以后,会报这个异常。"error": { "msg": "no servers hosting shard:...
阅读全文
摘要:环境搭建一.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、...
阅读全文
摘要: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)重...
阅读全文
摘要:solr在lucene外边做了一层厚厚的封装,主要是为了简化二次开发,提供了一些成熟的解决方案。solr和solrCoresolr可以对多个core进行综合管理,并接受请求选择特定的一个或者多个core执行相关任务。下面来回答什么是solr的core。core从文件结构的角度来看的话,主要包括一份索引(也可能还包括拼写检查的索引)、一堆配置文件。最主要的配置文件是:solrconfig.xml和schema.xml。solrconfig.xml从整体上对core进行了配置,例如索引的存放路径、字段的最大长度(maxFiedlLength)、写锁的超时时间(writeLockTimeout)、锁
阅读全文