`
JLK
  • 浏览: 232308 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论
文章列表

solr定制文档hash

    博客分类:
  • solr
我们知道,solr在添加文档建索引的时候,通过文档id来进行hash到具体哪一个shard上去,从而实现一个Collection上的数据平衡性。 但是这也有个弊端就是我们在做查询的时候,需要到每个shard并行查询,然后再将总结果返回,这一定程度上降低了性能。 solr支持一个特性就是我们可以通过特殊标记文档id,将这类文档都建立在特定的shard上,然后查询的时候只需要设置下一个参数 就可以支持直接到这个shard查询,从而提高了建索引的速度和查询速度。(带来的弊端就是一个Collection上的几个shard上的文档数量可能不均衡) 注意:这里的路由到特定的shard,但是没办法 ...

Distributed Requests

    博客分类:
  • solr
Distributed Requests Query all shards of a collection (the collection is implicit in the URL):   http://localhost:8983/solr/collection1/select? Query all shards of a compatible collection, explicitly specified:   http://localhost:8983/solr/collection1/select?collection=collection1_recent Quer ...

collection async

    博客分类:
  • solr
Asynchronous Calls Since some collection API calls can be long running tasks e.g. Shard Split, you can optionally have the calls run asynchronously. Specifying async=<request-id> enables you to make an asynchronous call, the status of which can be requested using the REQUESTSTATUS call a ...

Collections API timeouts

    博客分类:
  • solr
Such timeout can occur when Solr is not able to obtain cluster state. If following call is results in timeout, then this is the case http://solr-hostname:8983/solr/admin/collections?action=CLUSTERSTATUS&wt=json This may be caused by incorrect entries present in /clusterstate.json To fix thi ...
[root@localhost ~]# service httpd restart停止 httpd: [失败]正在启动 httpd:Syntax error on line 293 of /etc/httpd/conf/httpd.conf:DocumentRoot must be a directory[失败][root@localhost ~]# service httpd restart停止 httpd: [失败]正在启动 httpd: [确定]   解决 方法 : 这是因为 selinux 的权限问题导致, 解决方法 : 给网站文件 加apache 的权限 : ch ...

Solr原子更新

    博客分类:
  • solr
Solr4.0开始支持简单的原子更新和添加字段   参数说明 Solr支持多种修饰符,自动更新文档的值。 set – 更新一个字段 add – 添加一个字段

solr分组聚合

    博客分类:
  • solr
在大型电子商务网站中,在商品列表页,我们都可以看到商品按分类,品牌,价格的分类显示,如下图,这些我们可以使用solr中的facet功能实现。      facet的基本功能就是对搜索结果中的商品进行分类。     1.facet用法        facet.field:指定要分类的字段        facet=on 或 facet=true表示功能开启        facet.prefix 表示字段前缀        facet.limit 表示返回的记录数
1.格式  mvn deploy:deploy-file -DgroupId=com.qiyi -DartifactId=sphinx -Dversion=1.0 -Dpackaging=jar -Dfile=D:\sphinxapi.jar -Durl=[url] -DrepositoryId=[id 2.实例 D:\develop\apache-maven-3.0.4\bin>mvn deploy:deploy-file -DgroupId=org.sphx -DartifactId=sphinxapi -Dversion=1.0 -Dpackaging=jar -Dfile ...
参考:http://xupo.iteye.com/blog/1134986    http://logo32.blog.163.com/blog/static/668116902012825105651961/     检查一些依赖包的安装,通过yum来安装,如果Redhat5无法用yum,参考本人的另一篇文章:RHEL5 利用 CentOS的yum 安装openssl gc++及Nginx 1.确保系统已经安装以下包: Shell代码   # yum install libjpeg   
示例: ---------------------------------------------------------- config.xml <?xml version="1.0" encoding="GBK"?><param> <add name="pageSize" value="15">page</add> <add name="webSite" value="Rouselife">Test ...
  服务器端代码:     [java] view plaincopy
passbook通过gps定位,查看你passbook中是否在这个坐标附近有pass。   原理是这样,不需要通程网络,直接提醒你你下载的这个附近的pass。   但是gps定位和google地图的坐标会有一个的偏移   如果两个坐标规格不一样的话,算出来的结果也是会有偏差的,时常会发现标注的是这个附,而不提醒的状况。   所以,需要转换坐标,把地图上标注的坐标转换成gps规格的坐标,也称为地球坐标。   推荐一篇贴子,讲了把火星坐标怎么转成地球坐标 http://www.cnblogs.com/nolan022/articles/2601502.html
mac 更改jdk其实只要把软链改一下就行   /usr/bin/java指向的是 /System/Library/Frameworks/JavaVM.framework/Versions/Current 这个软链 只要把这个软链指向到你想要的jdk版本就行   sudo ln -s 1.5.0-leopard Current
  sql语句查询经纬度范围 指定一个经纬度,给定一个范围值(单位:千米),查出在经纬度周围这个范围内的数据。 经度:113.914619 纬度:22.50128 范围:2km longitude为数据表经度字段 latitude为数据表纬度字段 SQL在mysql下测试通过,其 ...
ssh user@IP -p port scp -P port file user@IP:file
Global site tag (gtag.js) - Google Analytics