[英]Highlighting Solr search results with bin/post and managed schema
I've got Solr 6.6.1 installed. 我已经安装了Solr 6.6.1。 I run bin/post to fetch and index some documents into a new core.
我运行bin / post来获取一些文档并将它们编入新的核心索引。 I'd like to add a text field and highlight on that field.
我想添加一个文本字段并在该字段上突出显示。 I notice that in server/solr/myCore/conf that there is a file, managed-schema, with a warning that tells me not to edit the file.
我注意到在server / solr / myCore / conf中有一个文件Managed-Schema,上面有一条警告,告诉我不要编辑该文件。
What's the supported way to use bin/post AND enable highlighting on a text field? 支持使用bin / post并在文本字段上突出显示的支持方式是什么?
Solr implicitly uses a ManagedIndexSchemaFactory
, which is by default "mutable" and keeps schema information in a managed-schema file. Solr隐式使用
ManagedIndexSchemaFactory
,默认情况下它是“可变的”,并将架构信息保存在托管模式文件中。
You have several choices: 您有几种选择:
Go back to <schemaFactory class="ClassicIndexSchemaFactory"/>
, so you will be able to change schema file manually. 返回
<schemaFactory class="ClassicIndexSchemaFactory"/>
,这样您将能够手动更改架构文件。
Stay with managed Schema API and just modification operations via HTTP to add new field, which you will use for highlighting. 使用托管模式API,仅通过HTTP进行修改操作即可添加新字段,您将使用该字段进行突出显示。
I would recommend to stick with #2, but it's totally up to you. 我建议坚持使用#2,但这完全取决于您。 Official documentation will help you to choose which schema options for your text fields you need to get the best out of highlighting.
官方文档将帮助您选择所需的文本字段架构选项,以充分利用突出显示功能。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.