SOLR Cloud(2)SOLR7 Single Instance

SOLR Cloud(2)SOLR7 Single Instance

I download the file from official website solr-7.0.0.tgz
Unzip that and place in the working directory.

The logging is here
/opt/solr/server/logs

Here is the command to Start that Service
>bin/solr restart

>bin/solr start

>bin/solr stop

Some of the Guide information is here:
file:///Users/carl/install/solr-7.0.0/README.txt

In our situation, our core named job, so I manually create a directory job
>mkdir /opt/solr/server/solr/job

I copied all the configurations from our old project and the sample configuration
drwxr-xr-x 3 carl staff 102 Sep 27 14:18 conf
-rw-r--r-- 1 carl staff 126 Sep 27 13:56 core.properties
drwxr-xr-x 5 carl staff 170 Sep 27 13:56 data
-rw-r--r-- 1 carl staff 0 Sep 27 14:17 index_synonyms.txt
-rw-r--r-- 1 carl staff 0 Sep 27 14:16 index_synonyms_case_sensitive.txt
drwxr-xr-x 40 carl staff 1360 Sep 27 13:56 lang
-rw-r--r--@ 1 carl staff 50880 Sep 27 13:55 managed-schema.bak
-rw-r--r--@ 1 carl staff 308 Sep 27 13:55 params.json
-rw-r--r-- 1 carl staff 0 Sep 27 14:18 protected_words.txt
-rw-r--r--@ 1 carl staff 873 Sep 27 13:55 protwords.txt
-rw-r--r-- 1 carl staff 25545 Sep 27 14:26 schema.xml
-rw-r--r--@ 1 carl staff 55062 Sep 27 14:29 solrconfig.xml
-rw-r--r--@ 1 carl staff 781 Sep 27 13:55 stopwords.txt
-rw-r--r--@ 1 carl staff 1124 Sep 27 13:55 synonyms.txt

The sample configuration is here
>cd /opt/solr/server/solr/configsets/_default/conf
drwxr-xr-x@ 40 carl staff 1360 Sep 8 14:34 lang
-rw-r--r--@ 1 carl staff 50880 Sep 8 14:34 managed-schema
-rw-r--r--@ 1 carl staff 308 Sep 8 14:34 params.json
-rw-r--r--@ 1 carl staff 873 Sep 8 14:34 protwords.txt
-rw-r--r--@ 1 carl staff 54994 Sep 8 14:36 solrconfig.xml
-rw-r--r--@ 1 carl staff 781 Sep 8 14:34 stopwords.txt
-rw-r--r--@ 1 carl staff 1124 Sep 8 14:34 synonyms.txt

And I renamed the original managed-schema and I copied the schema.xml from my old project

I click create a core on the UI from http://localhost:8983/

On the page, sometimes it keep throw exceptions, I just follow the guide from google results and clean them.
Exceptions:
fieldType 'booleans' not found in the schema

Solution:
https://stackoverflow.com/questions/31320696/solr-error-creating-core-fieldtype-x-not-found-in-the-schema
>grep "booleans" *
>vi solrconfig.xml

Just comments out the lines in solrconfig.xml

Restart the SOLR, then everything looks good.

Sample schema.xml for references:
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<!--
This is the Solr schema file. This file should be named "schema.xml" and
should be in the conf directory under the solr home
(i.e. ./solr/conf/schema.xml by default)
or located where the classloader for the Solr webapp can find it.

This example schema is the recommended starting point for users.
It should be kept correct and concise, usable out-of-the-box.

For more information, on how to customize this file, please see
http://wiki.apache.org/solr/SchemaXml

PERFORMANCE NOTE: this schema includes many optional features and should not
be used for benchmarking. To improve performance one could
- set stored="false" for all fields possible (esp large fields) when you
only need to search on the field but don't need to return the original
value.
- set indexed="false" if you don't need to search on the field, but only
return the field as a result of searching on other indexed fields.
- remove all unneeded copyField statements
- for best index size and searching performance, set "index" to false
for all general text fields, use copyField to copy them to the
catchall "text" field, and use that for searching.
- For maximum indexing performance, use the ConcurrentUpdateSolrServer
java client.
- Remember to run the JVM in server mode, and use a higher logging level
that avoids logging every request
-->

<schema name=“sillycat" version="1.5">
<!-- attribute "name" is the name of this schema and is only used for display purposes.
version="x.y" is Solr's version number for the schema syntax and
semantics. It should not normally be changed by applications.

1.0: multiValued attribute did not exist, all fields are multiValued
by nature
1.1: multiValued attribute introduced, false by default
1.2: omitTermFreqAndPositions attribute introduced, true by default
except for text fields.
1.3: removed optional field compress feature
1.4: autoGeneratePhraseQueries attribute introduced to drive QueryParser
behavior when a single string produces multiple tokens. Defaults
to off for version >= 1.4
1.5: omitNorms defaults to true for primitive field types
(int, float, boolean, string...)
-->


<!-- Valid attributes for fields:
name: mandatory - the name for the field
type: mandatory - the name of a field type from the
<types> fieldType section
indexed: true if this field should be indexed (searchable or sortable)
stored: true if this field should be retrievable
docValues: true if this field should have doc values. Doc values are
useful for faceting, grouping, sorting and function queries. Although not
required, doc values will make the index faster to load, more
NRT-friendly and more memory-efficient. They however come with some
limitations: they are currently only supported by StrField, UUIDField
and all Trie*Fields, and depending on the field type, they might
require the field to be single-valued, be required or have a default
value (check the documentation of the field type you're interested in
for more information)
multiValued: true if this field may contain multiple values per document
omitNorms: (expert) set to true to o
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值