- 浏览: 330399 次
- 性别:
- 来自: 广州
文章分类
- 全部博客 (350)
- JAVAEE (155)
- Gwt (27)
- Android (6)
- TaoBao (0)
- Xiaonei (0)
- Ubuntu (1)
- javafx (1)
- flex (0)
- GAE (2)
- Arcgis (1)
- Extjs (5)
- Dwr (1)
- ExtjsDwrSpring整合 (2)
- ophone (0)
- php (1)
- python (8)
- squid for windows download (1)
- Java (3)
- oracle (1)
- jquery (1)
- 淘宝 (1)
- 人生 (0)
- java项目运行时增加 (1)
- xfire (1)
- jquery mobile (1)
- ES (3)
- logstash (2)
- 8080端口占用 (1)
- 通达信 (1)
- mysql启动故障 (1)
- 微信小程序 (3)
- centos (1)
- redis (1)
- springcloud (1)
- python3.9 (1)
- python2.7 (1)
- ta-lib (0)
- ta-lib,TALIB (1)
- 安装TALIB,CENTOS (1)
- 终端关闭后 (1)
- vi (1)
- 命令行 (1)
- tomcat (2)
- nginx (3)
- linux (2)
- jdk (1)
- 开发环境 (1)
- nodejs (1)
- vs code (1)
- node js 全部版本 (1)
- JAVASCRIPT (1)
- pychar (1)
- mysql (3)
- win10 (1)
- elasticsearch plugin (1)
- vue (10)
- editplus (0)
- clickhouse (6)
- zabbix (1)
- quicktracking (1)
- quiktraking (1)
- talib (1)
- docker (1)
- excel (1)
- bat (1)
最新评论
-
ian_jiang:
不知道 你说了个 什么?
GWT下如何获取到javaee servlet下会话信息 -
心愿:
index.jsp应该建立在哪个目录下
dwr3.0的HELLOWORLD创建过程 -
349446658:
classpath:path是老的指定配置文件路径的方式。升级 ...
升级2 -
349446658:
新版本不是在type中指定first,而是指定1来表示跳到第一 ...
分页错误2 -
349446658:
这是因为后面的版本规范了指定配置文件路径的方式,必须指定为如下 ...
升级错误
Exercise 1: Index Techproducts Example Data
This exercise will walk you through how to start Solr as a two-node cluster (both nodes on the same machine) and create a collection during startup. Then you will index some sample data that ships with Solr and do some basic searches.
Launch Solr in SolrCloud Mode
To launch Solr, run: bin/solr start -e cloud on Unix or MacOS; bin\solr.cmd start -e cloud on Windows.
This will start an interactive session that will start two Solr "servers" on your machine. This command has an option to run without prompting you for input (-noprompt), but we want to modify two of the defaults so we won’t use that option now.
solr-8.1.0:$ ./bin/solr start -e cloud
Welcome to the SolrCloud example!
This interactive session will help you launch a SolrCloud cluster on your local workstation.
To begin, how many Solr nodes would you like to run in your local cluster? (specify 1-4 nodes) [2]:
The first prompt asks how many nodes we want to run. Note the [2] at the end of the last line; that is the default number of nodes. Two is what we want for this example, so you can simply press enter.
Ok, let's start up 2 Solr nodes for your example SolrCloud cluster.
Please enter the port for node1 [8983]:
This will be the port that the first node runs on. Unless you know you have something else running on port 8983 on your machine, accept this default option also by pressing enter. If something is already using that port, you will be asked to choose another port.
Please enter the port for node2 [7574]:
This is the port the second node will run on. Again, unless you know you have something else running on port 8983 on your machine, accept this default option also by pressing enter. If something is already using that port, you will be asked to choose another port.
Solr will now initialize itself and start running on those two nodes. The script will print the commands it uses for your reference.
Starting up 2 Solr nodes for your example SolrCloud cluster.
Creating Solr home directory /solr-8.1.0/example/cloud/node1/solr
Cloning /solr-8.1.0/example/cloud/node1 into
/solr-8.1.0/example/cloud/node2
Starting up Solr on port 8983 using command:
"bin/solr" start -cloud -p 8983 -s "example/cloud/node1/solr"
Waiting up to 180 seconds to see Solr running on port 8983 [\]
Started Solr server on port 8983 (pid=34942). Happy searching!
Starting up Solr on port 7574 using command:
"bin/solr" start -cloud -p 7574 -s "example/cloud/node2/solr" -z localhost:9983
Waiting up to 180 seconds to see Solr running on port 7574 [\]
Started Solr server on port 7574 (pid=35036). Happy searching!
INFO - 2017-07-27 12:28:02.835; org.apache.solr.client.solrj.impl.ZkClientClusterStateProvider; Cluster at localhost:9983 ready
Notice that two instances of Solr have started on two nodes. Because we are starting in SolrCloud mode, and did not define any details about an external ZooKeeper cluster, Solr launches its own ZooKeeper and connects both nodes to it.
After startup is complete, you’ll be prompted to create a collection to use for indexing data.
Now let's create a new collection for indexing documents in your 2-node cluster.
Please provide a name for your new collection: [gettingstarted]
Here’s the first place where we’ll deviate from the default options. This tutorial will ask you to index some sample data included with Solr, called the "techproducts" data. Let’s name our collection "techproducts" so it’s easy to differentiate from other collections we’ll create later. Enter techproducts at the prompt and hit enter.
How many shards would you like to split techproducts into? [2]
This is asking how many shards you want to split your index into across the two nodes. Choosing "2" (the default) means we will split the index relatively evenly across both nodes, which is a good way to start. Accept the default by hitting enter.
How many replicas per shard would you like to create? [2]
A replica is a copy of the index that’s used for failover (see also the Solr Glossary definition). Again, the default of "2" is fine to start with here also, so accept the default by hitting enter.
Please choose a configuration for the techproducts collection, available options are:
_default or sample_techproducts_configs [_default]
We’ve reached another point where we will deviate from the default option. Solr has two sample sets of configuration files (called a configset) available out-of-the-box.
A collection must have a configset, which at a minimum includes the two main configuration files for Solr: the schema file (named either managed-schema or schema.xml), and solrconfig.xml. The question here is which configset you would like to start with. The _default is a bare-bones option, but note there’s one whose name includes "techproducts", the same as we named our collection. This configset is specifically designed to support the sample data we want to use, so enter sample_techproducts_configs at the prompt and hit enter.
At this point, Solr will create the collection and again output to the screen the commands it issues.
Uploading /solr-8.1.0/server/solr/configsets/_default/conf for config techproducts to ZooKeeper at localhost:9983
Connecting to ZooKeeper at localhost:9983 ...
INFO - 2017-07-27 12:48:59.289; org.apache.solr.client.solrj.impl.ZkClientClusterStateProvider; Cluster at localhost:9983 ready
Uploading /solr-8.1.0/server/solr/configsets/sample_techproducts_configs/conf for config techproducts to ZooKeeper at localhost:9983
Creating new collection 'techproducts' using command:
http://localhost:8983/solr/admin/collections?action=CREATE&name=techproducts&numShards=2&replicationFactor=2&maxShardsPerNode=2&collection.configName=techproducts
{
"responseHeader":{
"status":0,
"QTime":5460},
"success":{
"192.168.0.110:7574_solr":{
"responseHeader":{
"status":0,
"QTime":4056},
"core":"techproducts_shard1_replica_n1"},
"192.168.0.110:8983_solr":{
"responseHeader":{
"status":0,
"QTime":4056},
"core":"techproducts_shard2_replica_n2"}}}
Enabling auto soft-commits with maxTime 3 secs using the Config API
POSTing request to Config API: http://localhost:8983/solr/techproducts/config
{"set-property":{"updateHandler.autoSoftCommit.maxTime":"3000"}}
Successfully set-property updateHandler.autoSoftCommit.maxTime to 3000
SolrCloud example running, please visit: http://localhost:8983/solr
Congratulations! Solr is ready for data!
You can see that Solr is running by launching the Solr Admin UI in your web browser: http://localhost:8983/solr/. This is the main starting point for administering Solr.
Solr will now be running two "nodes", one on port 7574 and one on port 8983. There is one collection created automatically, techproducts, a two shard collection, each with two replicas.
The Cloud tab in the Admin UI diagrams the collection nicely:
tutorial solrcloud
Figure 1. SolrCloud Diagram
Index the Techproducts Data
Your Solr server is up and running, but it doesn’t contain any data yet, so we can’t do any queries.
Solr includes the bin/post tool in order to facilitate indexing various types of documents easily. We’ll use this tool for the indexing examples below.
You’ll need a command shell to run some of the following examples, rooted in the Solr install directory; the shell from where you launched Solr works just fine.
Currently the bin/post tool does not have a comparable Windows script, but the underlying Java program invoked is available. We’ll show examples below for Windows, but you can also see the Windows section of the Post Tool documentation for more details.
The data we will index is in the example/exampledocs directory. The documents are in a mix of document formats (JSON, CSV, etc.), and fortunately we can index them all at once:
简单粗暴启动solr:
E:\source\solr-8.1.1\bin>dir
驱动器 E 中的卷是 文档
卷的序列号是 000F-FF12
E:\source\solr-8.1.1\bin 的目录
2019/07/16 17:24 <DIR> .
2019/07/16 17:24 <DIR> ..
2019/07/16 16:44 <DIR> init.d
2019/01/24 10:31 12,694 install_solr_service.sh
2018/03/15 10:51 1,255 oom_solr.sh
2018/10/24 14:44 8,209 post
2019/05/17 17:46 80,630 solr
2019/07/16 17:24 6 solr-8983.port
2019/05/17 17:46 73,679 solr.cmd
2019/05/17 17:46 9,331 solr.in.cmd
2019/05/17 17:46 9,851 solr.in.sh
8 个文件 195,655 字节
3 个目录 53,950,095,360 可用字节
E:\source\solr-8.1.1\bin>solr start
Java HotSpot(TM) 64-Bit Server VM warning: JVM cannot use large page memory beca
use it does not have enough privilege to lock pages in memory.
Waiting up to 30 to see Solr running on port 8983
Started Solr server on port 8983. Happy searching!
This exercise will walk you through how to start Solr as a two-node cluster (both nodes on the same machine) and create a collection during startup. Then you will index some sample data that ships with Solr and do some basic searches.
Launch Solr in SolrCloud Mode
To launch Solr, run: bin/solr start -e cloud on Unix or MacOS; bin\solr.cmd start -e cloud on Windows.
This will start an interactive session that will start two Solr "servers" on your machine. This command has an option to run without prompting you for input (-noprompt), but we want to modify two of the defaults so we won’t use that option now.
solr-8.1.0:$ ./bin/solr start -e cloud
Welcome to the SolrCloud example!
This interactive session will help you launch a SolrCloud cluster on your local workstation.
To begin, how many Solr nodes would you like to run in your local cluster? (specify 1-4 nodes) [2]:
The first prompt asks how many nodes we want to run. Note the [2] at the end of the last line; that is the default number of nodes. Two is what we want for this example, so you can simply press enter.
Ok, let's start up 2 Solr nodes for your example SolrCloud cluster.
Please enter the port for node1 [8983]:
This will be the port that the first node runs on. Unless you know you have something else running on port 8983 on your machine, accept this default option also by pressing enter. If something is already using that port, you will be asked to choose another port.
Please enter the port for node2 [7574]:
This is the port the second node will run on. Again, unless you know you have something else running on port 8983 on your machine, accept this default option also by pressing enter. If something is already using that port, you will be asked to choose another port.
Solr will now initialize itself and start running on those two nodes. The script will print the commands it uses for your reference.
Starting up 2 Solr nodes for your example SolrCloud cluster.
Creating Solr home directory /solr-8.1.0/example/cloud/node1/solr
Cloning /solr-8.1.0/example/cloud/node1 into
/solr-8.1.0/example/cloud/node2
Starting up Solr on port 8983 using command:
"bin/solr" start -cloud -p 8983 -s "example/cloud/node1/solr"
Waiting up to 180 seconds to see Solr running on port 8983 [\]
Started Solr server on port 8983 (pid=34942). Happy searching!
Starting up Solr on port 7574 using command:
"bin/solr" start -cloud -p 7574 -s "example/cloud/node2/solr" -z localhost:9983
Waiting up to 180 seconds to see Solr running on port 7574 [\]
Started Solr server on port 7574 (pid=35036). Happy searching!
INFO - 2017-07-27 12:28:02.835; org.apache.solr.client.solrj.impl.ZkClientClusterStateProvider; Cluster at localhost:9983 ready
Notice that two instances of Solr have started on two nodes. Because we are starting in SolrCloud mode, and did not define any details about an external ZooKeeper cluster, Solr launches its own ZooKeeper and connects both nodes to it.
After startup is complete, you’ll be prompted to create a collection to use for indexing data.
Now let's create a new collection for indexing documents in your 2-node cluster.
Please provide a name for your new collection: [gettingstarted]
Here’s the first place where we’ll deviate from the default options. This tutorial will ask you to index some sample data included with Solr, called the "techproducts" data. Let’s name our collection "techproducts" so it’s easy to differentiate from other collections we’ll create later. Enter techproducts at the prompt and hit enter.
How many shards would you like to split techproducts into? [2]
This is asking how many shards you want to split your index into across the two nodes. Choosing "2" (the default) means we will split the index relatively evenly across both nodes, which is a good way to start. Accept the default by hitting enter.
How many replicas per shard would you like to create? [2]
A replica is a copy of the index that’s used for failover (see also the Solr Glossary definition). Again, the default of "2" is fine to start with here also, so accept the default by hitting enter.
Please choose a configuration for the techproducts collection, available options are:
_default or sample_techproducts_configs [_default]
We’ve reached another point where we will deviate from the default option. Solr has two sample sets of configuration files (called a configset) available out-of-the-box.
A collection must have a configset, which at a minimum includes the two main configuration files for Solr: the schema file (named either managed-schema or schema.xml), and solrconfig.xml. The question here is which configset you would like to start with. The _default is a bare-bones option, but note there’s one whose name includes "techproducts", the same as we named our collection. This configset is specifically designed to support the sample data we want to use, so enter sample_techproducts_configs at the prompt and hit enter.
At this point, Solr will create the collection and again output to the screen the commands it issues.
Uploading /solr-8.1.0/server/solr/configsets/_default/conf for config techproducts to ZooKeeper at localhost:9983
Connecting to ZooKeeper at localhost:9983 ...
INFO - 2017-07-27 12:48:59.289; org.apache.solr.client.solrj.impl.ZkClientClusterStateProvider; Cluster at localhost:9983 ready
Uploading /solr-8.1.0/server/solr/configsets/sample_techproducts_configs/conf for config techproducts to ZooKeeper at localhost:9983
Creating new collection 'techproducts' using command:
http://localhost:8983/solr/admin/collections?action=CREATE&name=techproducts&numShards=2&replicationFactor=2&maxShardsPerNode=2&collection.configName=techproducts
{
"responseHeader":{
"status":0,
"QTime":5460},
"success":{
"192.168.0.110:7574_solr":{
"responseHeader":{
"status":0,
"QTime":4056},
"core":"techproducts_shard1_replica_n1"},
"192.168.0.110:8983_solr":{
"responseHeader":{
"status":0,
"QTime":4056},
"core":"techproducts_shard2_replica_n2"}}}
Enabling auto soft-commits with maxTime 3 secs using the Config API
POSTing request to Config API: http://localhost:8983/solr/techproducts/config
{"set-property":{"updateHandler.autoSoftCommit.maxTime":"3000"}}
Successfully set-property updateHandler.autoSoftCommit.maxTime to 3000
SolrCloud example running, please visit: http://localhost:8983/solr
Congratulations! Solr is ready for data!
You can see that Solr is running by launching the Solr Admin UI in your web browser: http://localhost:8983/solr/. This is the main starting point for administering Solr.
Solr will now be running two "nodes", one on port 7574 and one on port 8983. There is one collection created automatically, techproducts, a two shard collection, each with two replicas.
The Cloud tab in the Admin UI diagrams the collection nicely:
tutorial solrcloud
Figure 1. SolrCloud Diagram
Index the Techproducts Data
Your Solr server is up and running, but it doesn’t contain any data yet, so we can’t do any queries.
Solr includes the bin/post tool in order to facilitate indexing various types of documents easily. We’ll use this tool for the indexing examples below.
You’ll need a command shell to run some of the following examples, rooted in the Solr install directory; the shell from where you launched Solr works just fine.
Currently the bin/post tool does not have a comparable Windows script, but the underlying Java program invoked is available. We’ll show examples below for Windows, but you can also see the Windows section of the Post Tool documentation for more details.
The data we will index is in the example/exampledocs directory. The documents are in a mix of document formats (JSON, CSV, etc.), and fortunately we can index them all at once:
简单粗暴启动solr:
E:\source\solr-8.1.1\bin>dir
驱动器 E 中的卷是 文档
卷的序列号是 000F-FF12
E:\source\solr-8.1.1\bin 的目录
2019/07/16 17:24 <DIR> .
2019/07/16 17:24 <DIR> ..
2019/07/16 16:44 <DIR> init.d
2019/01/24 10:31 12,694 install_solr_service.sh
2018/03/15 10:51 1,255 oom_solr.sh
2018/10/24 14:44 8,209 post
2019/05/17 17:46 80,630 solr
2019/07/16 17:24 6 solr-8983.port
2019/05/17 17:46 73,679 solr.cmd
2019/05/17 17:46 9,331 solr.in.cmd
2019/05/17 17:46 9,851 solr.in.sh
8 个文件 195,655 字节
3 个目录 53,950,095,360 可用字节
E:\source\solr-8.1.1\bin>solr start
Java HotSpot(TM) 64-Bit Server VM warning: JVM cannot use large page memory beca
use it does not have enough privilege to lock pages in memory.
Waiting up to 30 to see Solr running on port 8983
Started Solr server on port 8983. Happy searching!
发表评论
-
SpringCloud00 _Restemplate的getForEntity、getForObject、 postForEntity、postForObjec
2022-10-20 02:26 145SpringCloud00 _Restemplate的get ... -
java键盘机器人
2022-08-18 16:26 165package com.yuexiu.yxdp.rpt.be ... -
java常用快捷键
2022-08-18 15:47 188IDEA中常用快捷键 psvm —— 用来快速写一个ma ... -
idea在旧环境里安装又出这个问题了
2022-08-11 17:33 2415这个一眼就看出来是找不到jre的错误。关键 ... -
mysql 5.5的安装包官网下载地址
2022-07-07 21:09 400https://downloads.mysql.com/arc ... -
idea java开发快捷键
2022-07-07 15:02 174在dao层的mapper类里。直接按住ctrl+左键可定位.x ... -
plugin
2022-07-05 10:45 167INFO] Finished at: 2022-07-05T1 ... -
maven配置,通用setting.xml配置-改为阿里云
2022-07-04 10:50 551maven配置,通用setting.xml配置-改为阿里云 ... -
启动模块时报错,命令行过长,command is too long.
2022-07-04 06:42 1171启动模块时报错,命令行过长,command is too lo ... -
node js 全部版本
2022-07-01 10:58 2551https://nodejs.org/en/download/ ... -
post json
2022-07-01 08:00 141try { String ding ... -
post json
2022-07-01 07:56 136package com.arpenker.stockrobot ... -
resttemplate
2022-06-30 15:21 183private static ResponseEntity&l ... -
量化工
2022-06-30 09:54 533String url = "https://api. ... -
eclipse快捷键
2022-06-30 09:18 199package shortcutKey; public cl ... -
ideajdk
2022-06-10 08:06 175「ideajdk」https://www.aliyundriv ... -
nohup java
2022-05-30 19:02 600nohup java -jar test.jar > . ... -
nohup java
2022-05-30 18:36 775springboot 项目内嵌tomcat,一般打包成jar ... -
查服务器硬盘内存CPU
2022-05-25 17:31 272grep MemTotal /proc/meminfo # ... -
tomcat8 和 jdk8
2022-05-21 08:06 215「tomcat8jdk8」https://www.aliyu ...
相关推荐
使用Solr内置的Jetty服务器启动Solr (1)借助X Shell上传solr的安装包到/usr/local/目录下,使用 tar -zxvf命令进行解压. (2)使用内置的Jetty来启动Solr服务器只需要在example目录下,执行start.jar程序即可,...
内涵solr单机,solr windows集群,solr linux集群搭建方法,中文分词,数据同步增量配置等
我博客《solr7.4集群安装》对应的相关文件;https://blog.csdn.net/guojun8446
文档详细介绍了,布署solr-5.3.1的完整流程,按照此文档可搭建用于生产环境的高可靠性solr集群
solr集群
本文档用于solr集群的搭建,在liunx系统中搭建solr集群利用生成的索引文件提高查询速度此文档可以帮助你快速完成集群的搭建。
solr集群安装部署,对于初学者可以了解下
solr集群安装,本人操作一步写一步,绝对可靠,快下载吧
docker搭建zookeeper+solr集群.md
集群搭建(zookeeper集群+solr集群)整个步骤本人亲身实践过,如果自身电脑配置高,可以尝试模拟真实服务器进行搭建;
自己总结的文档,我边安装边截图,通俗易懂,只需要你按着文档,就可以一次性安装成功,为你节约了时间,省去烦恼
solr在Linux下搭建集群solr在Linux下搭建集群solr在Linux下搭建集群solr在Linux下搭建集群solr在Linux下搭建集群solr在Linux下搭建集群solr在Linux下搭建集群
solr集群的详细搭建步骤,有兴趣的可以学习一下
solr 使用官方指南,solr 使用官方指南solr 使用官方指南solr 使用官方指南
配置solr出现404,试过很多方法解决不了,这有配置好的现成的,在wen.xml中将solrhome路径改成你创建的solrhome的路径
一键安装zk集群-solr集群脚本,伪分布式安装,solr版本为5.5,务必先查看安装须知
solr 集群搭建1
solr4.9+tomcat+zookeeper集群
solr5.5.4.war&tomcat8.5.20,solr环境已经配置好。直接启动Tomcat即可使用,使用的java环境是1.8的版本,低版本没测试过。solrHhome配置在Tomcat目录下,solr日志配置在Tomcat日志目录下。