Data-config.xml and mysql - I can load only “id” column

大憨熊 提交于 2019-12-05 10:05:20

That warning in the logs is actually the real issue.

If you look in the solrconfig.xml file you will have a section:

<schemaFactory class="ManagedIndexSchemaFactory">
  <bool name="mutable">true</bool>
  <str name="managedSchemaResourceName">managed-schema</str>
</schemaFactory>

This means that your schema.xml file is being ignored. Instead the file managed-schema in the same folder will be being used.

There are a couple of ways to solve this. You can comment out the managed schema section and replace it with

<schemaFactory class="ClassicIndexSchemaFactory"/>

Or another way is to delete the managed-schema file. SOLR will then read the schema.xml file on restart and generate a new managed-schema. If that works then you should then see your fields at the bottom of the file.

For more information please see:

https://cwiki.apache.org/confluence/display/solr/Managed+Schema+Definition+in+SolrConfig

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!