solr5.3基本学习教程

本文档提供了Solr 5.3.1版本在Windows 7环境下的快速启动步骤,包括如何启动与停止Solr服务、创建核心、导入官方Demo中的索引数据,以及一些示例查询来帮助用户快速上手。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

首先切换到 solr 目录 (window7 环境,下载solr5.3.1版本 http://archive.apache.org/dist/lucene/solr/5.3.1/
1、启动solr 
bin\solr.cmd start 或者
bin\solr start
bin\solr start -p 8984 指定端口启动 (默认8983)
2、关闭solr
bin\solr stop -p 8984
3、以官方一个特定的配置实例启动
bin\solr -e techproducts
4、查看solr服务状态
bin\solr status
查看:http://localhost:8983/solr/
5、创建核心
bin\solr create -c <name>  (<name> 为核心的名字)
查看其他参数 
bin\solr create -help
6、导入官方demo中索引
java -classpath example\exampledocs\post.jar -Dauto=yes -Dc=gettingstarted -Ddata=files org.apache.solr.util.SimplePostTool example/exampledocs/*.*
7、开启solr之旅
http://localhost:8983/solr/gettingstarted/select?q=video
http://localhost:8983/solr/gettingstarted/select?q=video&fl=id,name,price
http://localhost:8983/solr/gettingstarted/select?q=name:*black
http://localhost:8983/solr/gettingstarted/select?q=price:[0%20TO%20400]&fl=id,name,price
http://localhost:8983/solr/gettingstarted/select?q=price:[0%20TO%20400]&fl=id,name,price&facet=true&facet.field=cat

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值