需要对 schema.xml 和 solrconfig.xml 进行更改

发布于 2024-08-21 18:25:50 字数 93 浏览 4 评论 0原文

我使用 solrj 添加一些字段。我需要在 solrconfig.xml 和 schema.xml 中进行哪些更改?

我是 solr 新手,希望得到一些帮助

I'm adding a few fields using solrj. What changes need i make in the solrconfig.xml and schema.xml?

I'm new to solr and i'd love some help

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

屋顶上的小猫咪 2024-08-28 18:25:50

除非您要更改 solr 实例的行为方式,否则您不需要更改 solrconfig.xml。添加字段只需要 schema.xml 包含如下行:

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

You shouldn't need to change solrconfig.xml unless you are changing the way your solr instance behaves. Adding a field just requires that schema.xml include a line like:

<field name="myField" type="[field of a type defined in your schema]" indexed="true|false"  stored="true|false"  multiValued="true|false" /> 
相对绾红妆 2024-08-28 18:25:50

值得注意的是,如果 solrconfig.xml 中的设置未规定使用单独的 schema.xml,那么它将默认使用托管架构文件。

Its worth noting that if your settings in solrconfig.xml do not prescribe using a separate schema.xml then it will default to using a managed-schema file.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文