Reply
Contributor
Posts: 55
Registered: ‎09-17-2013
Accepted Solution

Schema.xml for new collection in CloudEra search

Hi,

I have installed cloudera search using RPMs on Cent OS and able to work on flume NRT as well. I had to add a  new fileld to the existing collection in order to support the same while indexing the data. I want to know, how and from where the schema.xml is picked up for a collection.? and how can we change the schema after creating the collection for the first time. I have tried changing schema.xml in various places, but nothing seems to be working..

Cloudera Employee
Posts: 98
Registered: ‎07-31-2013

Re: Schema.xml for new collection in CloudEra search

Hey Srini,

 

When you first created the collection, you ran a command similar to:

 

- solrctl instancedir --generate $HOME/solr_configs

 

This command was what created the configs that you imported for solr.  You can see the various configs by running:

 

- solrctl instancedir --list

 

Then pick the config that goes with your collection and run:

 

- solrctl instancedir --get <name_from_list> /path/to/local_fs

 

Then change the schema.xml in /path/to/local_fs/conf and run:

 

- solrctl instancedir --update <name_from_list> /path/to/local_fs

 

Then the schema will get updated.  Note, when you update the schema, you have to reindex all your documents or else they won't have indexes for the latest schema changes.

 

Hope this helps.

 

Thanks

Chris

Highlighted
Cloudera Employee
Posts: 146
Registered: ‎08-21-2013

Re: Schema.xml for new collection in CloudEra search

Wrt. morphline commands, the Solr schema is fetched from wherever the SolrLocator is pointing to: http://cloudera.github.io/cdk/docs/current/cdk-morphlines/morphlinesReferenceGuide.html#solrLocator

The Solr schema can be managed via the solrctrl CLI: http://www.cloudera.com/content/cloudera-content/cloudera-docs/Search/latest/Cloudera-Search-User-Gu...

For more on installing and managing Cloudera Search see http://www.cloudera.com/content/cloudera-content/cloudera-docs/Search/latest/Cloudera-Search-Install...

Contributor
Posts: 55
Registered: ‎09-17-2013

Re: Schema.xml for new collection in CloudEra search

Thanks Chris.. I understood the process when i spent more time on it. I have tried the same and it did work.. Probably i might have asked question little too early.. :) Thanks for your resonse...