摘要:
需求:商品排序,无库存的商品排在后面(排序)。搜索:默认搜索: 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)重... 阅读全文
摘要:
elasticSearch node 的配置如下:# Every node can be configured to allow or deny being eligible as the master,# and to allow or deny to store the data.## Allo... 阅读全文
摘要:
This article introduces the networking part of Elasticsearch. We look at the network topology of an Elasticsearch cluster, which connections are estab... 阅读全文
摘要:
http://blog.csdn.net/accesine960/article/details/80668772012年10月12日,Lucene 4.0正式发布了(点击这里下载最新版),这个版本因为诸多的新特性和大胆的架构调整一直备受期待。无论是索引结构,索引算法以及整体架构的包容性都发生了翻天... 阅读全文
摘要:
TheBig Data Zoneis presented bySplunk, the maker of data analysis solutions such asHunk, an analytics tool for Hadoop, and theSplunk Web Framework.Liv... 阅读全文
摘要:
FACET1)Terms Facet{ "query" : { "match_all" : { } }, "facets" : { "tag" : { "terms" : { "field" : "tag", "size" : 10 } } }}被统计(facet)的字段一般不分词(例如商品的类目字段——类目唯一),但也支持分词后term不多的字段(例如商品的标签字段)。 对应这种facet我们主要关注几点:facet的字... 阅读全文
摘要:
curl -XPUT localhost:9200/local -d '{ "settings" : { "analysis" : { "analyzer" : { "stem" : { "tokenizer" : "standard", "filter" : ["standard", "lowercase", "stop", "porter_stem"] } } } 阅读全文
摘要:
先来一个标准分词(standard),配置如下:curl -XPUT localhost:9200/local -d '{ "settings" : { "analysis" : { "analyzer" : { "stem" : { "tokenizer" : "standard", "filter" : ["standard", "lowercase", "stop", "p 阅读全文
摘要:
This article is from an interview withZuhaib Siddique, a production engineer atHipChat, makers ofgroup chat and IM for teams.HipChat started in an unusual space, one you might not think would have much promise, enterprise group messaging, but as we are learning there is gold in them thereenterprise 阅读全文
摘要:
http://blog.thetaphi.de/2012/07/use-lucenes-mmapdirectory-on-64bit.html从3.1版本开始,Lucene和Solr开始在64位的Windows和Solaris系统中默认使用MMapDirectory,从3.3版本开始,64位的Linux系统也启用了这个配置。这个变化使一些Lucene和Solr的用户有些迷茫,因为突然之间他们的系统的某些行为和原来不一样了。在邮件列表中,一些用户发帖询问为什么使用的资源比原来多了很多。也有很多专家开始告诉人们不要使用MMapDirectory。但是从Lucene的commiter的视角来看,MM 阅读全文