Solr文档学习--Using the Solr Administration User Interface

之前写了一篇

Solr文档学习–Getting Started

今天继续第二章,管理控制台,先从概念上了解solr

启动

首先启动solr(windows版)进入solr的解压目录

solr.cmd start

这里写图片描述

接下来我们进入管理控制台

http://localhost:8983/solr/

这里写图片描述

左边是一个导航,包括控制面板,日志记录,Core Admin/Collections ,Java属性,进程等,如果配置了Core Admin/Collections还可以看到一个Core Admin/Collections的工具。

如果是以SolrCloud模式开启,左侧的导航栏将会是Cloud和Collections

Start Solr in SolrCloud mode 命令

solr.cmd start -c 

这里写图片描述

本文是在单击模式,所以讨论的都是Core Admin,其实和Collections是一个概念

Collections / Core Admin

Dashboard和Logging不做过多解释,一个是控制面板,一个是日志的相关信息。
我们来开最重要的Collections / Core Admin,其实这个我个人觉得可以理解为数据库中的表(集合),而且这个名字和mongodb中的collections感觉是一个概念。下文我将已集合这个概念来描述Collections / Core Admin

一开始是没有集合的。

我们可以在控制台创建集合,也可以在命令行创建集合。

控制台创建集合之前需要首先创建集合需要的相关目录。

这里写图片描述

命令行创建集合

保证solr已经启动

solr.cmd create -c mycollections

创建一个mycollections的集合

这里写图片描述

在控制台就能看到刚才创建的集合了

这里写图片描述

控制台创建集合

首先创建集合实例存放的目录,我这里创建一个mycollection2的目录

在solr解压目录的server/solr下

这里写图片描述

再创建集合数据存放的目录,我在mycollection2下面创建了一个data目录

这里写图片描述

再进入控制台创建集合

这里写图片描述

不过这个时候还会报错

Error CREATEing SolrCore 'mycollection2': Unable to create core [mycollection2] Caused by: Can't find resource 'solrconfig.xml' in classpath or 'D:\solr-6.1.0\server\solr\mycollection2'

说mycollection2下缺少solrconfig.xml

将solr解压目录下example目录files\conf中的solrconfig.xml拷贝到mycollection2\data下

这里写图片描述

这个时候还会报错

Error CREATEing SolrCore 'mycollection2': Unable to create core [mycollection2] Caused by: Can't find resource 'schema.xml' in classpath or 'D:\solr-6.1.0\server\solr\mycollection2'

缺少schema.xml,这个新版本其实不需要这个文件的,它被新的叫做managed-schema的文件代替了,但是在控制台创建还是要schema.xml的,拷贝一个,还是从solr的example\files\conf下拷贝,将其拷贝到mycollection2下面,并重命名为schema.xml

这里写图片描述

再次创建还会报错,

org.apache.solr.common.SolrException: Error CREATEing SolrCore 'mycollection2': Unable to create core [mycollection2] Caused by: Can't find resource 'lang/contractions_it.txt' in classpath or 'D:\solr-6.1.0\server\solr\mycollection2'

这是因为刚才重命名的schema.xml有一些停止词之类的依赖,都在lang文件夹下。

我们还是从solr的example\files\下的conf目录拷贝到mycolletion2下面

mycollections2的最终目录结构

这里写图片描述

再次创建

这里写图片描述

创建成功,这个控制台还是比较麻烦的,推荐用命令行创建集合

未完待续……

参考文献

Solr官方文档6.1版


如果觉得我的文章对您有用,请随意打赏

这里写图片描述

已标记关键词 清除标记
相关推荐
Lucidworks for solr This guide includes the following sections: : This section guides you through the installation and setup of Solr. Getting Started : This section introduces the Solr Web-based Using the Solr Administration User Interface 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. : This section describes how Solr organizes its data Documents, Fields, and Schema Design for indexing. It explains how a Solr schema defines the fields and field types which Solr use to organize data within the document files it indexes. : This section explains how Solr prepares Understanding Analyzers, Tokenizers, and Filters text for indexing and searching. Analyzers parse text and produce a stream of tokens, lexica units used for indexing and searching. Tokenizers break field data down into tokens. Filters perform other transformational or selective work on token streams. : This section describes the indexing process and basic Indexing and Basic Data Operations index operations, such as commit, optimize, and rollback. : This section presents an overview of the search process in Solr. It describes the Searching 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. : This section discusses performance tuning for Solr. It The Well-Configured Solr Instance begins with an overview of the file, then tells you how to configure cores solrconfig.xml with , how to configure the Lucene index writer, and more. solr.xml : This section discusses important topics for running and monitoring Solr. It Managing Solr describes running Solr in the Apache Tomcat servlet runner and Web server. Other topics include how to back up a Solr instance, and how to run Solr with Java Management Extensions (JMX). : This section tells you how to grow a Solr distribution by dividing a Scaling and Distribution large index into sections called shards, which are then distributed across multiple servers, or by replicating a single index across multiple services. : This section tells you how to access Solr through various client APIs, including Client APIs JavaScript, JSON, and Ruby.
©️2020 CSDN 皮肤主题: 酷酷鲨 设计师:CSDN官方博客 返回首页