Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Update morphlines and solr collection schema

Update morphlines and solr collection schema

Expert Contributor

Hi, I'm using 

flume + morphlines + SolrSink to ingest data into Solr.

The question is:

1. I've created collection with my schema.xml

2. started to ingest incomming data

 

Then i deciced to add one more field to index

1. I did update schema.xml and updated it in solr using cmd

2. I did update morphlines in Flume

 

I get exception from solr side: "unknown field". 

What is the right order to make solr, flume to know about newly added field?

 

1 REPLY 1

Re: Update morphlines and solr collection schema

Cloudera Employee

Hi 

 

What is the right order to make solr, flume to know about newly added field?

 

After you updated the schema.xml, you must have used "solrctl instancedir --update .." to update the configs right? If so, you should also run "solrctl collection --reload <NAME>" after the above step. This will make sure Solr reads the latest configs from ZK.

 

As long as you have restarted the flume job after the schema change, you should be able to add data to the latest field. (Please verify the field names being used in morphline with those in schema.xml)