(9-5)创建一个索引库





默认网页只有一个 索引库collection1,自己手动创建一个索引库collection2:




[root@baozi solr]# pwd
/usr/local/solr/example/solr
[root@baozi solr]#



[root@baozi solr]# ll
总用量 20
drwxr-xr-x. 2 root root 4096 9月   8 2014 bin
drwxr-xr-x. 4 root root 4096 5月  10 21:32 collection1
-rw-r--r--. 1 root root 2473 9月   8 2014 README.txt
-rw-r--r--. 1 root root 1715 9月   8 2014 solr.xml
-rw-r--r--. 1 root root  501 9月   8 2014 zoo.cfg
[root@baozi solr]# cp -r collection1/ collection2/
[root@baozi solr]# 




[root@baozi solr]# pwd
/usr/local/solr/example/solr
[root@baozi solr]# cd collection2/
[root@baozi collection2]# ll
总用量 16
drwxr-xr-x. 6 root root 4096 5月  12 21:48 conf
-rw-r--r--. 1 root root   16 5月  12 21:48 core.properties
drwxr-xr-x. 4 root root 4096 5月  12 21:48 data
-rw-r--r--. 1 root root 2146 5月  12 21:48 README.txt
[root@baozi collection2]# vim core.properties
[root@baozi collection2]# more core.properties
name=collection2

[root@baozi collection2]#

//core.properties修改为2或删除


//重启solr:
[root@baozi solr]# bin/solr restart
Sending stop command to Solr running on port 8983 ... waiting 5 seconds to allow Jetty process 2628 to stop gracefully.
Waiting to see Solr listening on port 8983 [-]
Started Solr server on port 8983 (pid=3503). Happy searching!
                                                                                                                                
[root@baozi solr]#




在网页里就可以看到了;


创建成功!

-----------------------------------------------------------------------------

多core:

solr start -s multicore/



[root@baozi multicore]# pwd
/usr/local/solr/example/multicore
[root@baozi multicore]# ll
总用量 24
drwxr-xr-x. 3 root root 4096 9月   8 2014 core0
drwxr-xr-x. 3 root root 4096 9月   8 2014 core1
drwxr-xr-x. 2 root root 4096 5月  10 21:23 exampledocs
-rw-r--r--. 1 root root  267 9月   8 2014 README.txt
-rw-r--r--. 1 root root 1588 9月   8 2014 solr.xml
-rw-r--r--. 1 root root  501 9月   8 2014 zoo.cfg
[root@baozi multicore]# ll -R core0
core0:
总用量 4
drwxr-xr-x. 2 root root 4096 5月  10 21:23 conf


core0/conf:
总用量 8
-rw-r--r--. 1 root root 1879 9月   8 2014 schema.xml
-rw-r--r--. 1 root root 4026 2月  28 02:09 solrconfig.xml

[root@baozi multicore]#



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值