您的位置:首页 > 其它

关于solr指导文档,自己做的翻译(有的地方翻译的不是很准确,但是我觉的可以作为一个指导)

2017-11-24 00:55 465 查看
Apache Solr Reference Guide

This reference guide describes Apache Solr, the open source solution for search.

Solr builds on Lucene, an open source Java library that provides indexing and search technology, as well as

spellchecking, hit highlighting and advanced analysis/tokenization capabilities. Both Solr and Lucene are

managed by the Apache Software Foundation (www.apache.org). You can download Apache Solr from the

Solr website at http://lucene.apache.org/solr/.

阿帕奇solr指导文档

这份指导文档介绍了阿帕奇solr搜索引擎,它是一个开源的搜索解决方案。

solr建立在lucene上,一个开源的java库,它提供了索引和搜索技术,同样它具有拼写检查,高亮显示和先进的分析标记的能力。

solr和lucene都有Apache Software Foundation管理,你可以下载Apache solr从solr的网站上http://lucene.apache.org/solr/.

This Guide contains the following main sections:(总共是十二个部分)

这个文档主要包括以下几个主要的部分

1、Getting Started: This section guides you through the installation and setup of Solr.

Getting Started:这个部分主要指引你安装和配置solr的

2、Solr Control Script Reference: This section provides information about all of the options available to the

bin/solr / bin\solr.cmd scripts, which can start and stop Solr, configure authentication, and create or

remove collections and cores.

solr Control Script Reference(solr的脚本控制参考):这部分主要是提供了所有关于所有关于一些脚本控制,它可以启动和

停止solr,配置认证,创建一处collection和cores(这里就是一些索引库)。

3、Using the Solr Administration User Interface: This section introduces the Solr Web-based user interface.

From your browser you can view configuration files, submit queries, view logfile settings and Java

environment settings, and monitor and control distributed configurations.

使用solr的管理员用户接口:这个部分主要介绍了solr的Web基本的用户接口,从你的浏览器可以查看一些配置文件,提交一些

查询,看一日志设置,java环境的设置,和监控和控制分布式配置

4、Documents, Fields, and Schema Design: This section describes how Solr organizes its data for indexing. It

explains how a Solr schema defines the fields and field types which Solr uses to organize data within the

document files it indexes.、

文档、文件和约束的设计:这个部分描述了怎么为索引组织它的数据,它解释了怎么定义它的约束域和类型,它可以组织数据在创建

文档索引文件

5、Understanding Analyzers, Tokenizers, and Filters: This section explains how Solr prepares text for

indexing and searching. Analyzers parse text and produce a stream of tokens, lexical units used for indexing

and searching. Tokenizers break field data down into tokens. Filters perform other transformational or

selective work on token streams.

了解分析、断词和过滤:这个部分主要解释了为索引和搜索怎么准备text,分析解析text并生成tokens的流,(这部分先不翻译,因为不

理解是干什么用的)

6、Indexing and Basic Data Operations: This section describes the indexing process and basic index

operations, such as commit, optimize, and rollback.

索引和基础数据操作:这个部分描述了索引过程和基本索引的操作,利索提交、优化、回滚

7、Searching: This section presents an overview of the search process in Solr. It describes the main

components used in searches, including request handlers, query parsers, and response writers. It lists the

query parameters that can be passed to Solr, and it describes features such as boosting and faceting, which

can be used to fine-tune search results.

搜索:这个部分介绍了solr的搜索过程。主要描述了在搜索中的一些主要的主键,和主要介绍了boosting和faceting的特点,这个

可以微调搜索结果

8、The Well-Configured Solr Instance: This section discusses performance tuning for Solr. It begins with an

overview of the solrconfig.xml file, then tells you how to configure cores with solr.xml , how to configure

the Lucene index writer, and more.

很好的配置solr实例:这个部分主要很好的调整solr。我们从一个solrconfig.xml的配置看起,然后怎么配置一个cores在solr.xml中

然后入配置lucene索引和更多的配置

9、Managing Solr: This section discusses important topics for running and monitoring Solr. Other topics

include how to back up a Solr instance, and how to run Solr with Java Management Extensions (JMX).

管理solr:这个部分主要是讨论关于运行监控solr的重要话题。其他的话题包括怎么退会solr实例和怎么

运行solr在java的管理扩展中

10、SolrCloud: This section describes the newest and most exciting of Solr’s new features, SolrCloud, which

provides comprehensive distributed capabilities.

solrcoloud(solr集群):这个部分主要讨论最新的和大多数存在的solr的新的特征,solrcloud,它提供了综合的

分布式能力

11、Legacy Scaling and Distribution: This section tells you how to grow a Solr distribution by dividing a large

index into sections called shards, which are then distributed across multiple servers, or by replicating a

single index across multiple services.

Legacy Scaling and Distribution:这个部分主要是告诉我们怎么成为一个solr分布式通过把一个大的索引划分为不同的几个部分

我们叫他片,然后通过不同的服务器来实现分布式,通过不同的服务替换单一的索引库

12、Client APIs: This section tells you how to access Solr through various client APIs, including JavaScript, JSON,

and Ruby.

客户端API:这个部分主要告诉我们访问solr通过client的api,通过javaScript,json和ruby

page 4 of 1030

About This Guide

This guide describes all of the important features and functions of Apache Solr.

Solr is free to download from http://lucene.apache.org/solr/.
Designed to provide high-level documentation, this guide is intended to be more encyclopedic and less of a

cookbook. It is structured to address a broad spectrum of needs, ranging from new developers getting

started to well-experienced developers extending their application or troubleshooting. It will be of use at

any point in the application life cycle, for whenever you need authoritative information about Solr.

The material as presented assumes that you are familiar with some basic search concepts and that you can

read XML. It does not assume that you are a Java programmer, although knowledge of Java is helpful when

working directly with Lucene or when developing custom extensions to a Lucene/Solr installation.

这个指导文档主要是描述了Apache Solr的一些重要特征和功能

Solr是可以免费的从Http://lucene.apache.org/solr/去下载

设计提供一个高水平的文档,这个目的是提供一个百科而不是一个食谱。

这段没必要翻译,就是简单的介绍了一下solr

Hosts and Port Examples

The default port when running Solr is 8983. The samples, URLs and screenshots in this guide may show

different ports, because the port number that Solr uses is configurable.

If you have not customized your installation of Solr, please make sure that you use port 8983 when following

the examples, or configure your own installation to use the port numbers shown in the examples. For

information about configuring port numbers, see the section Managing Solr.

Similarly, URL examples use localhost throughout; if you are accessing Solr from a location remote to the

server hosting Solr, replace localhost with the proper domain or IP where Solr is running.

For example, we might provide a sample query like:
http://localhost:8983/solr/gettingstarted/select?q=brown+cow
There are several items in this URL you might need to change locally. First, if your server is running at

"www.example.com", you’ll replace "localhost" with the proper domain. If you aren’t using port 8983, you’ll

replace that also. Finally, you’ll want to replace "gettingstarted" (the collection or core name) with the

proper one in use in your implementation. The URL would then become:

http://www.example.com/solr/mycollection/select?q=brown+cow

这个是讨论关于访问solr的时候的域名和端口,默认的是8983,你可以更改通过配置文件

Path information is given relative to solr.home , which is the location under the main Solr installation where

Solr’s collections and their conf and data directories are stored.

When running the various examples mentioned through out this tutorial (i.e., bin/solr -e techproducts )

the solr.home will be a sub-directory of example/ created for you automatically.

这个就是讲了一下路径,索引,配置文件,数据的存储路径

Special Inline Notes

 
Solr Tutorial 

This tutorial covers getting Solr up and running, ingesting a variety of data sources into multiple collections,

and getting a feel for the Solr administrative and search interfaces.

It is organized into three sections that each build on the one before it. The first exercise will ask you to start

Solr, create a collection, index some basic documents, and then perform a few searches.

The second exercise works with a different set of data, and explores requesting facets with the dataset.

The third exercise encourages you to begin to work with your own data and start a plan for your

implementation.

Finally, we’ll introduce spatial search and show you how to get your Solr instance back into a clean state
 solr的辅助

这个辅助包括怎么启动和运行solr,怎么将不同的数据导入到不同的集合中,

在我们开始之前我们认识三个联系,第一个联系是问你怎么启动solr,怎么创建collection,索引的基础文档,

然后在展示几个搜索然

第二个练习运行在不同的数据集合中,研究怎么请求数据集合

第三个练习鼓励你开始使用你自己的数据到你的应用中区

最后,我们介绍搜索和怎么是你的实例回到一个干净的状态

Before You Begin

To follow along with this tutorial, you will need…

1. To meet the system requirements

2. An Apache Solr release download. This tutorial is designed for Apache Solr 7.0.

For best results, please run the browser showing this tutorial and the Solr server on the same machine so

tutorial links will correctly point to your Solr server.

在你开始之前

下面的帮助,是你需要的

1、系统运行的环境

2、准备一个Apache solr的版本,这个资料最好是solr7.0

最好的结果,(最后的不会翻译,但是没有什么作用)

Unpack Solr

Begin by unzipping the Solr release and changing your working directory to the subdirectory where Solr was

installed. For example, with a shell in UNIX, Cygwin, or MacOS:

~$ ls solr*

solr-7.0.0.zip

~$ unzip -q solr-7.0.0.zip

~$ cd solr-7.0.0/

If you’d like to know more about Solr’s directory layout before moving to the first exercise, see the section

Directory Layout for details.

解压solr包

在当你解压了这个包后就相当于把solr已经安装了,下面的脚本是在unix,cygwin,macos系统运行的

如果你想了解更多的关于solr的目录结构在我们开始第一个练习之前,请看目录结构的那个部分,这里有详细的细节

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.

练习1:是一个生产的实例数据

这个练习将带你通过怎么开启俩个接的的集群(但是这俩个节点是在同一个机器上的),并且在启动的时候创建

一个索引集合。然后你将索引一些数据那就是solr和做一些基础的搜索

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.

启动solr集群模式

去启动solr,运行bin/solr start -e cloud 在unix或者是macos的系统上,bin\solr.cmd start -e cloud 在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服务在我们的机器上,这个命令有一个选项可以不用任何的提示就可以运行,不过你

需要输入-noprompt,但是我们想要修改俩个默认的值得,我们就不用这样的操作了项了。

        solr-7.0.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 .

这个提示提示我们要运行几个节点,在最后一行上说是默认2个节点;2俩个节点就是我们在这个势力中

想要的,所以你简单的按一下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.

这个端口就是我们第一个节点运行的端口。除非你想其他的端口而不是在8983在你的机器上。接受默认操作

那么就按一下enter键。如果你使用了这个那个默认的端口,那么将提示你选择另一个节点的端口

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.

这个端口是第二节点将要运行的端口,除非你想用其他端口而不是7574在你的机器上,接受默认操作

那就按enter键。剩下的文档我觉的是复制了上边的,所以就不要翻译了

Solr will now initialize itself and start running on those two nodes. The script will print the commands it uses

for your reference.

solr将初始化它自己,兵器开始运行俩个节点。脚本将打印一些指令,这些指令可以当做你的参考

下面边红色部分就是我们打印的一些东西。

Creating Solr home directory E:\solr\solr-7.0.0\solr-7.0.0\example\cloud\node1\s
olr
Cloning E:\solr\solr-7.0.0\solr-7.0.0\example\cloud\node1 into
  E:\solr\solr-7.0.0\solr-7.0.0\example\cloud\node2
创建了一个solrhome在

E:\solr\solr-7.0.0\solr-7.0.0\example\cloud\node1\s

olr

并克隆了一份到node2的节点上

Starting up Solr on port 8983 using command:
"E:\solr\solr-7.0.0\solr-7.0.0\bin\solr.cmd" start -cloud -p 8983 -s "E:\solr\so
lr-7.0.0\solr-7.0.0\example\cloud\node1\solr"
启动solr 在端口8983使用下面的命令

Waiting up to 30 to see Solr running on port 8983
Started Solr server on port 8983. Happy searching!
等待30秒,已经启动
Starting up Solr on port 7574 using command:
"E:\solr\solr-7.0.0\solr-7.0.0\bin\solr.cmd" start -cloud -p 7574 -s "E:\solr\so
lr-7.0.0\solr-7.0.0\example\cloud\node2\solr" -z localhost:9983
同样启动7574端口的solr使用下面的命令
Waiting up to 30 to see Solr running on port 7574
INFO  - 2017-10-26 00:37:18.911; org.apache.solr.client.solrj.impl.ZkClientClust
erStateProvider; Cluster at localhost:9983 ready
同样等待30秒,7574也启动了
启动了,集群已经在9983端口准备好了
Now let's create a new collection for indexing documents in your 2-node cluster.
现在让我们创建一个新的索引集合文档对象在你的俩个节点的集群上
Please provide a name for your new collection: [gettingstarted]
Started Solr server on port 7574. Happy searching!
请提供一个名字为你的新的索引集合,开始索引服务7574

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.

注意现在俩个solr服务实例已经运行在俩个节点上。因为我们开启了solrCloud模式(也就是solr集群),

但是我们没有定义任何的细节关于扩展的Zookeeper集群,solr就开启了它自己的zookeeper,并且把俩个节点

都连接到了它自己的zookeeper上边

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

现在这个地方就是我们就不使用默认的操作了。这个地方就是让我放solr索引数据的地方,我们叫techproducts 数据。

让我们给他起一个techproducts。为了容易区分其他的索引集合,输入techproducts然后点击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.

我们又到了不使用默认操作的地方了。solr有放配置文件的地方

这个索引集合必须有一个configeSet,他是一个最小数量的配置文件数对于solr来说:一个是约束文件(

我们叫他管理约束或者schema.xml),和另一个配置文件solrconfig.xml。在这里我们是使用那个配置文件集合做我们

我们使用的配置文件的,_default配置文件集合是一个很少绑定操作的,但是我们注意了哪里有一个包括

‘techproducts’文字的集合名称。和我们索引集合名字是一样的。这个配置文件集合石特殊为我们支持简单数据而设计

的,也是我们想要的,所以我们选择sample_techproducts_configs,然后点击enter键。

到此,solr就创建一个索引集合,并又一次输出到屏幕上命令和问题

Connecting to ZooKeeper at localhost:9983 ...

INFO  - 2017-10-26 01:30:03.893; org.apache.solr.client.solrj.impl.ZkClientClust

erStateProvider; Cluster at localhost:9983 ready

Uploading E:\solr\solr-7.0.0\solr-7.0.0\server\solr\configsets\sample_techproduc

ts_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&num
Shards=2&replicationFactor=2&maxShardsPerNode=-1&collection.configName=techprodu

cts

{

  "responseHeader":{

    "status":0,

    "QTime":12633},

  "success":{

    "192.168.56.1:7574_solr":{

      "responseHeader":{

        "status":0,

        "QTime":9285},

      "core":"techproducts_shard1_replica_n2"},

    "192.168.56.1:8983_solr":{

      "responseHeader":{

        "status":0,

        "QTime":9285},

      "core":"techproducts_shard1_replica_n1"}}}

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
这是成功的创建了一个集群。solrCloud事例已经运行,请访问http://localhost:8983/solr

 恭喜你,solr已经为数据做好了准备

你可以通过访问http://localhost:8983去加载solr用户UI来查看solr正在运行。这是solr的开始的用户界面

solr从现在开始已经用运行了俩个节点,一个端口是7574,一个端口是8983。也会有一个索引集合自动的创建,techproducts,俩个分片集合

俩个分片又分别有俩个备份数据,

 techproduts集合数据索引

你的solr服务器已经启动和运行,但是它还没有数据,所以我们不能有任何的查询

solr有一个bin/post的工具,可以很容易帮助你建立不同类型的document是索引。我用将使用这个工具来为下面的索引实例建立索引

你讲需要一个工具shell如运行下面的实例,在solr的根目录中安装一个文件夹,这个shell是从你slor安装的根目录;这个shell在你启动

solr的时候已经开始工作了

当前这个bin/post没有适合windows的脚本,但是可以借助java程序来实现还是有可能的。我们将在下面展示一个关于windows的例子,

但是你需要看windows的部分post工具的更多细节的部分

数据我们索引将在example/exampledocs的目录中。这些文档是一个各种类型(json格式的,csv格式的,等等)的混合模式的文档,庆幸的是我们可以立刻给他们创建

索引

 最上边的是linux/mac用的命令

 下面是windows中用的命令

  我是在windows中练习的所以使用的windows中的命令,执行完后

 

 你应该很熟悉的看到了下面的输出(文档中就是说的我们上面的那张图片)

 再次祝贺你,你已经在你的solr中有了数据

现在我们准备去搜索吧

 基础的搜索

solr可以同rest clients、curl、wget、chorme postMan,etc.等工具来查询,同样我们可以通过其他很多语言的程序客户端来查询。

solr的用户客户端也包含了一个查询工具接口,通过查询表单来查询techproducts的索引集合(在http://localhost:8983/solr/#/techproducts/query)

如果你不用改变任何的form表单中的数据可以直接点击确认查询按钮,你将得到10文档json格式的数据

 

 屏幕查询

这个url通过admin UI发送给了solr服务器,这个url以一个亮灰色显示在屏幕右边顶部的地方。如果你点击这个url的话,

你的浏览器将会响应你的数据

如果是使用curl工具,你可以使用同样的url展示到你的浏览器中在命令行中加上引号

我们使用q的查询参数使用一个特殊规则来请求所有的额文档。所有的文档不会都返回给我们,然后由于默认的一个参数叫行数,这个行数你可以

看到在表单中是一个10。你可以改变这个参数或者你想使用这个默认的参数也可以

solr 有一个非常强大的选项,不是所有的东西都要给赋值,但是我们可以覆盖一下公有的类型查询

 单词搜索。

用一个词来查询,把一个词输入到q参数的值里在solr Ui界面,用一个你想找到的词来替换*:*

输入foundation然后再次电你确认查询按钮

如果你更钟情于curl,那输入像下面的的就可以,

你可以看到一些东西就像这样:

  
通过相信中的指示,哪里有4个命中数(numFound4)。我们在上面一个简单的输出已经得到一个文档,但是只有4个命中数远低于我们

输入的行数参数值,你应该只能看到4个

注意响应头在这个文档中,这个头部包含了你搜索时设置的参数。默认情况下这里仅显示你这次查询中设置的参数,在这个例子中你主要是

使用了一个词。

这个文档中我们看到了每个文档在索引中的所有域。这是个默认的行为。如果你想在响应中限制几个域的话,你可以使用f1参数,这个参数

可以分离几个域名,这个将会从所有域名中分离出来。把这个可用的域在查询表单中在amdin UI中

输入id到fl的输入框中,然后点击确认查询,在curl中输入下面的

你应该已经看到匹配的ids的返回记录了

 

域查询

所有的solr查询都是使用一些域来查找文档。你经常想通过多个域在同一时间来查询,到目前为止我们只是使用foundation来查询。这是有可能使用复制域查询,这个是我们已经在配置文件集合中创建了。我们将在第二个联系当中重新的看一下复制域。

有时,你想使用单个域来限制你的查询。这样你可以提高你的查询效率,而且结果有可能更符合用户

大多数的数据在我们小的简单的数据集合和产品是有关系的。让我们看看,我们想查到所有的electronics有关的产品在索引中。在屏幕查询中,输入electronics(不用带引号)在那个q的输入框中,然后在点击确认查询。你将得到14个结果,例如:

 
这个查询查找所有文档,这些文档包括了electronics在索引域中。然后我们在上面我们看到cat域中看到electronics这个字段。如果我们限制我们查询使用分类域查询,折耳根结果对于用户来说更加精确。

更新一下q的查询域,现在你就得到了12个结果。

Using curl, this query would look like this:

curl "http://localhost:8983/solr/techproducts/select?q=cat:electronics"

如果使用curl查询的话,向下面这样查询就可以了

 
短语查询

对于多个单词的短语的搜索,把双引号去掉把单词填入到q那个输入框中。例如CAS latency输入后q输入框中搜索在用户界面中

如果是使用curl的话,注意在俩个词里的空格必须转换成+号,就像下面那样。

我们将得到俩个结果。

结合查询

默认情况下,当你使用多个短词或这是短语查询时,solr仅仅需要的是这些词中的一个来和当前的文档来匹配。文档包含多个词的话将在结果列表中排在最前面

你可以在词和短语前面加一个+号(prefix),然后并不容许在这个词前面加一个减号。

这样查找文档的时候就会同时包含electronics和music,输入+electronics +music在q的输入框

 如果你是用curl的话,你必须把加号编码一下,因为它在urls将被编码成空格,所以需要使用%2B转意一下。就像下面的例子

你应该只得到了一个结果。

 关于更多的搜索信息

我们只是使用了一些表面上搜索项在solr服务器中。更多的搜索引擎搜索项,去搜索的部分查看。

 联系1的总结

在这章,你已经知道了怎么索引数据和做一些基础的查询。你可以从现在开始继续下一个事例,这个实例介绍的更多的solr概念,例如faceting result 和管理你的

约束文件,或者是。。

如果你继续使用这个资料的话,这个数据到目前为止对于你来说应该是很少的值了。你可以删除掉并重新开始,或者是你可以使用脚本来删除删除这个集合

bin/solr delete -c techproducts  删除索引集合

bin/solr create -c <yourCollection> -s 2 -rf 2  创建一个你的集合

bin/solr stop -all 停止所有的solr服务

更多的开始停止索引集合的选项在bin/solr,可以看solr脚本参考文档

 联系2:修改约束文件,索引films数据

重启solr

你有从联系1中停止solr服务么?没有么?那么我们在下接下来的部分做一些准备工作

如果你停止了,你需要重启solr服务,第一个命令是重启node1的节点,第二个启动第二个节点并连接上zookeeper

这样就启动了solr服务器。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐