2017-06-23 14:04:33,435 WARN mapred.LocalJobRunner - job_local860080165_0001
java.lang.Exception: org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: This IndexSchema is not mutable.
at org.apache.hadoop.mapred.LocalJobRunner$Job.runTasks(LocalJobRunner.java:462)
at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:522)
Caused by: org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: This IndexSchema is not mutable.
at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:491)
at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:197)
at org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:117)
解决方法:
reference:https://stackoverflow.com/questions/31719955/solr-error-this-indexschema-is-not-mutable
在solrconfig.xml文件中将AddSchemaFieldsUpdateProcessorFactory部分从节点updateRequestProcessorChain中注释掉。
知其然和所以然:
下面是solrconfig.xml文件中对updateRequestProcessorChain的解释:
<!-- Add unknown fields to the schema An example field type guessing update processor that will attempt to parse string-typed field values as Booleans, Longs, Doubles, or Dates, and then add schema fields with the guessed field types. This requires that the schema is both managed and mutable, by declaring schemaFactory as ManagedIndexSchemaFactory, with mutable specified as true. See http://wiki.apache.org/solr/GuessingFieldTypes --> <updateRequestProcessorChain name="add-unknown-fields-to-the-schema"> ... </updateRequestProcessorChain>
schemaFactory在上文中提到了,它可以指定两个值:
1)ClassicIndexSchemaFactory(默认值):需要使用schema.xml文件,并且只能通过手动修改这个问题;只在collection加载的时候加载。不允许Schema API来修改schema。
2)ManagedIndexSchemaFactory:可以通过Schema API来修改schema,不会再读schema.xml文件,而是取managedSchemaResourceName中定义的资源
我的solrconfig.xml中并未指定schemaFactory的值,即使用了ClassicIndexSchemaFactory,执行中不准许修改schema。
AddSchemaFieldsUpdateProcessorFactory:如果输入的document包含了不匹配schema的feilds,这些fields会动态的添加到schema中,可见它是用于ManagedIndexSchemaFactory的配置。不属于我们这种情况。
相关推荐
Nutch+solr + hadoop相关框架搭建教程
Windows下cygwin+MyEclipse 8.5+Nutch1.2+Tomcat 6.0 Windows下cygwin+MyEclipse 8.5+Nutch1.2+Tomcat 6.0 Windows下cygwin+MyEclipse 8.5+Nutch1.2+Tomcat 6.0
Nutch,第2部分:搜索(译文) Nutch,第2部分:搜索(译文)
nutch入门经典翻译1:Introduction to Nutch, Part 1: Crawling
nutch2.3+hbase0.94.14+hadoop1.2.1安装文档.txt )
( Nutch,第1部分:爬行(译文) ( Nutch,第1部分:爬行(译文)
nutch爬虫,java也能做爬虫,不一定非得用python呦
本项目是基于Apache Nutch和Solr开发的AJAX页面内容爬取与处理设计源码,主要使用Java进行开发。项目共包含1064个文件,其中Java源代码文件458个,XML配置文件181个,文本文件81个,HTML页面文件56个,JPG图片文件56...
OCR_FontsSearchEngine, 一种超立方体Nutch和PHP的OCR搜索引擎 Silex框架 ;thiagoalessio ;nutch1.10+solr4.10.4 ;``` shell
Nutch抓取指定网址数据,存储在HBase数据库中,存储过程由zookeeper管理。脚本调用索引器部件将数据索引化,经过索引化的数据被前端检索查询,最后前端展示查询结果,用户点击结果列表查看目标资料。
使用Nutch和Tika爬行和重复数据删除重复数据集 #Politeness配置:为了处理礼貌,已将属性添加到文件nutch-site.xml中。 我们将坚果机器人(http.agent.name)标记为CS572 RASNA,代理说明(http.agent.description)...
Nutch2.3.1 环境搭建 Nutch2.3.1 环境搭建 Nutch2.3.1 环境搭建 亲测可用,我自己安装和搭建过程的记录文档
java实现的开源搜索引擎nutch 主要类分析: 一、org.apache.nutch.crawl.Injector: 1,注入url.txt 2,url标准化 3,拦截url,进行正则校验(regex-urlfilter.txt) 4,对符URL标准的url进行map对构造, ...
1.1 Solr 简介 1.1.1 Solr 的特性 1.1.2 Solr 的目录结构 1.1.3 Solr 与Lucene 关系 1.2 Solr 安装 1.2.1 环境介绍 1.2.2 安装Solr 1.2.3 结合Nutch
基于Nutch+ElasticSearch+MySQL+SSM的简易搜索引擎
Lucene+Nutch本书源码+详细说明,研究搜索引擎具体抓取与解析等技术问题,有利于搜索引擎开发新手的熟悉与了解,难得的电子版,值得珍藏
自己写的 hadoop nutch solr 环境搭建手册,成功搭建后写的,会有红色标注容易出错的地方
引入hadoop+nutch+solr的优点: (1)hadoop平台数据处理高效。hadoop集群处理数据比起单机节省数倍的时间,数据量越大优势越明显,满足信息采集对数据处理的速度和质量要求。 (2)hadoop平台具有高扩展性。可以...
apache-nutch-2.2.1(Eclipse直接运行版)今天刚做的,发现有很多坑,分享给大家实验,JDK1.7 Win10。我分享的两个压缩卷一起下载才可以用,资源限制太小了 002地址:...
nutch+lucene开发自己的搜索引擎 第三章开源搜索引擎入门