标签归档:solr

org.apache.solr.common.SolrException: Exception writing document id 663b167f2d661568 to the index; possible analysis error: cannot change DocValues type from SORTED_SET to NUMERIC for field “is_original”

org.apache.solr.common.SolrException: Exception writing document id 663b167f2d661568 to the index; possible analysis error: cannot change DocValues type from SORTED_SET to NUMERIC for field "is_original"

我这里修改tints类型为tint类型,导致新数据无法写入,字段删除完毕了,也reload了没有,只要清理的数据才行

<delete><query>*:*</query></delete>
<commit/>

solr内存配置,solr时区配置

配置文件位置:/etc/default/solr.in.sh

配置内存
SOLR_JAVA_MEM=”-Xms1g -Xmx6g
这两个配置分别为最小内存和最大内存
配置時區
SOLR_TIMEZONE=”Asia/Shanghai”

其他配置
SOLR_PID_DIR=”/mnt/www/solr”
SOLR_HOME=”/mnt/www/solr/data”
LOG4J_PROPS=”/mnt/www/solr/log4j.properties”
SOLR_LOGS_DIR=”/mnt/www/solr/logs”
SOLR_PORT=”8983″

solr-6.4.1 安装笔记

1. 下载、解压
wget http://mirrors.hust.edu.cn/apache/lucene/solr/6.4.1/solr-6.4.1.tgz
tar zxf solr-6.4.1.tgz

2. 安装JAVA运行环境
yum install java-1.8.0-openjdk

==========solr 标准安装方法==============

# 准备数据目录和安装目录

# 数据存放目录
mkdir /mnt/www/solr
# 软件安装目录
mkdir /usr/local/solr

#安装软件和服务

./solr-6.4.1/bin/install_solr_service.sh solr-6.4.1.tgz -d /mnt/www/solr -i /usr/local/solr

# 创建core

su - solr -c "/usr/local/solr/solr/bin/solr create -c doufu"

# 启动停止方法(centos 7)

# 先停止solr
su - solr -c "/usr/local/solr/solr/bin/solr stop"
# 启动solr
systemctl restart solr
# 查看solr运行状态
systemctl status solr
# centos6 可用service控制
service solr start/stop/restart

# 访问Web控制台
http://youip:8983/

# 下一步:

solr内存配置,solr时区配置

# misc:

[root@web4 solr]# bin/solr --help

Usage: solr COMMAND OPTIONS
where COMMAND is one of: start, stop, restart, status, healthcheck, create, create_core, create_collection, delete, version, zk

Standalone server example (start Solr running in the background on port 8984):

./solr start -p 8984

SolrCloud example (start Solr running in SolrCloud mode using localhost:2181 to connect to Zookeeper, with 1g max heap size and remote Java debug options enabled):

./solr start -c -m 1g -z localhost:2181 -a “-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044”

Pass -help after any COMMAND to see command-specific usage information,
such as: ./solr start -help or ./solr stop -help