简单solr安装

参考:http://www.solrcn.com/
http://www.solr.cc/blog/
http://www.qikor.com/2014/08/08/apache-solr-4-9-and-ikanalyzer-up/
http://www.qikor.com/2014/08/10/apache-solr-4-9-and-ikanalyzer-down/
1、下载
[url]http://archive.apache.org/dist/lucene/solr/[/url]
我下的是5.1.0的
安装solr:解压的一个过程
2、配置core
启动服务:solr start
[img]http://dl2.iteye.com/upload/attachment/0108/6618/034bd374-7cfc-347d-bc68-b088e0085d76.png[/img]
[url]http://localhost:8983/solr[/url]
创建core: solr create -c <name>
[img]http://dl2.iteye.com/upload/attachment/0108/6620/cfe99347-a7fe-3c5b-ae19-7a0d0640d062.png[/img]
增加文档:(windows下)java -Durl=http://localhost:8983/solr/mycore/update -Ddata=files -jar post.jar *.xml
[img]http://dl2.iteye.com/upload/attachment/0108/6622/7fdc8577-3998-3ff9-bcb7-948ce7932717.png[/img]
3、使用

简单查询:http://localhost:8983/solr/core/select?q=video(文档中默认为name)
http://localhost:8983/solr/core/select?q=name:black
过滤字段(只显示什么字段):http://localhost:8983/solr/core/select?q=*%3A*&fl=id%2Cname%2Cprice&wt=json&indent=true
区间查询:http://localhost:8983/solr/core/select?q=price%3A[0+TO+400]&fl=id%2Cname%2Cprice&wt=json&indent=true
分组查询:
http://localhost:8983/solr/core/select?q=price%3A[0+TO+400]&fl=id%2Cname%2Cprice&wt=json&indent=true&facet=true&facet.field=cat
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值