Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Schema.xml for new collection in CloudEra search

avatar
Rising Star

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..

2 ACCEPTED SOLUTIONS

avatar
Super Collaborator

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

View solution in original post

avatar
Super Collaborator
3 REPLIES 3

avatar
Super Collaborator

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

avatar
Rising Star

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...

avatar
Super Collaborator
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...