solrsolr5

New field added to schema.xml not showing in Analysis tool


I have just started working with Solr version 5.5 and I switched from the managed schema to the non-managed schema.

I found the schema.xml in \server\solr\configsets\basic_configs\conf

I edited that file and added a new fieldType.

I shut down Solr and started it up again. I went to the Analysis page for my "gettingstarted" / "cloud" core. The list of fields does not show my new fieldType.

I then looked around and concluded that schema.xml is supposed to be with the 'core' so I copied everything from the above "conf" directory and placed it in SOLR_HOME\example\cloud\node1\solr\conf

I again shut down and restarted Solr. Still, my field does not show up.

The logs don't seem to indicate any failure loading schema.xml but the log also doesn't tell me exactly where it is looking for it.

Can someone confirm where schema.xml should be located and assist with how I can figure out why my custom field Type doesn't show up? Also, is there something in the logs that can confirm if I successfully disabled the managed schema? Perhaps the solrconfig.xml I modified is the wrong one?


Solution

  • Create collection collection API. check how directory is created for core.

    Example:

    http://localhost/solr/admin/collections?action=CREATE&name=collectionname&collection.configName=configname
    

    change name and collection.configName values.

    Usually when you create new collection directory with name as collection name is created in server/solr/

    if you give name=collection1 and collection.configName=basic_configs

    this will create directory collection1 inside it conf folder which contains all schema and config files. if you want to make changes you should consider files inside server/solr/collection1/conf/

    NOTE: schema and managed-schema are same, just naming convention used in later version. you can modify field type and its definition in that file.