[英]how to add new Fields into solr schema
I am doing data import from Mongo to Solr. 我正在将数据从Mongo导入到Solr。 For this I need to add new fields into the Solr schema. 为此,我需要向Solr模式中添加新字段。 I am using solr server 5.1.0. 我正在使用solr服务器5.1.0。
对于数据导入,您需要db-data-config.xml文件,您将在其中放置sql查询并使用SOLR对其进行配置。有关如何实现配置的信息,请转到此链接
I have find a way to add the fields into schema. 我找到了一种将字段添加到架构的方法。 Please provide your input if there is any other proper way of doing it. 如果有其他适当的方法,请提供您的输入。
1. add schema.xml file into your solr/core1/conf directory. 1.将schema.xml文件添加到您的solr / core1 / conf目录中。 2. copy all content of managed-schema into schema.xml 2.将托管模式的所有内容复制到schema.xml中
3. add the new fields into schema.xml. 3.将新字段添加到schema.xml中。
4. delete the managed-schema.xml 4.删除managed-schema.xml
5. restart the solr it will create a managed-schema.xml and will move schema.xml to scheam.bkp 5.重新启动solr,它将创建一个managed-schema.xml,并将schema.xml移至scheam.bkp
References- 参考资料
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.