简体   繁体   English

对schema.xml和solrconfig.xml所需的更改

[英]Changes needed to schema.xml and solrconfig.xml

I'm adding a few fields using solrj. 我正在使用solrj添加一些字段。 What changes need i make in the solrconfig.xml and schema.xml? 我需要在solrconfig.xml和schema.xml中进行哪些更改?

I'm new to solr and i'd love some help 我是Solr的新手,我希望得到一些帮助

You shouldn't need to change solrconfig.xml unless you are changing the way your solr instance behaves. 除非更改solr实例的行为方式,否则无需更改solrconfig.xml。 Adding a field just requires that schema.xml include a line like: 添加一个字段仅需要schema.xml包含如下一行:

<field name="myField" type="[field of a type defined in your schema]" indexed="true|false"  stored="true|false"  multiValued="true|false" /> 

值得注意的是,如果您在solrconfig.xml中的设置未规定使用单独的schema.xml,则它将默认使用托管模式文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM