Skip to content

Instantly share code, notes, and snippets.

@rnjailamba
Last active June 14, 2023 16:51
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save rnjailamba/dc5068fbd883d963f7ec to your computer and use it in GitHub Desktop.
Save rnjailamba/dc5068fbd883d963f7ec to your computer and use it in GitHub Desktop.
Remove managed-schema and get schema.xml in SOLR core [ Version 5.5.0 ]
Lets say solr is located at /usr/local/solr-5.5.0 .
1. bin/solr start
2. bin/solr create -c test
3. location of new core is here /usr/local/solr-5.5.0/server/solr/test
4. location of solrconfig is here /usr/local/solr-5.5.0/server/solr/test/solrconfig.xml
5. Open solrconfig.xml -
You will find this
<schemaFactory class="ManagedIndexSchemaFactory">
<bool name="mutable">true</bool>
<str name="managedSchemaResourceName">managed-schema</str>
</schemaFactory>
6. Change to
<schemaFactory class="ClassicIndexSchemaFactory">
</schemaFactory>
7. Rename the managed-schema file( /usr/local/solr-5.5.0/server/solr/test/managed-schema ) to schema.xml.
8. Reload the core(s).
@rnjailamba
Copy link
Author

@supix
Copy link

supix commented Dec 6, 2016

Nice tip. Thanks.

@shiloh00
Copy link

Thanks !

@Riofh
Copy link

Riofh commented Jan 3, 2018

I am working on Apache Solr version 7.2.0. While follow these steps I unable to find step 5. Can anyone help me on this?

@ssxaoz
Copy link

ssxaoz commented Jan 17, 2018

In Solr 7.2.0.
Open solrconfig.xml - find <directoryFactory... and then... simply copy-paste between these sections
.....

<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/>
   <!-- PUT IT AFTER "directoryFactory" -->
      <schemaFactory class="ClassicIndexSchemaFactory">
      </schemaFactory>
   <!-- PUT IT BEFORE "codecFactory" -->
<codecFactory class="solr.SchemaCodecFactory"/>

@joshiabhishek12
Copy link

org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Could not load conf for core connect: Can't load schema C:\Users\solr-8.11.2\solr-8.11.2\server\solr\connect\conf\schema.xml: Unknown fieldType 'int' specified on field id it showing this error how to fifix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment