solr - Apache Solr - 为 solr 版本 6.5 加载类 solr.NestPathField 时出错
问题描述
试图在 solr 6.5 中的托管模式中嵌套子文档 -
<fieldType name="_nest_path_" class="solr.NestPathField"/>
<field name="_root_" type="string" indexed="true" stored="false" docValues="false" />
<field name="_childDocuments_" type="_nest_path_">
<field name="id" type="string" multiValued="false" indexed="true" required="true" stored="true"/>
<field name="firstname" type="text_general" indexed="true" stored="true"/>
<field name="lastname" type="text_general" indexed="true" stored="true"/>
但似乎_nest_path_
solr 6.5 不支持该字段并出现错误Error loading class solr.NestPathField
。
有什么替代方法可以在不使用的情况下存储子文档,nest_path
或者我在这里做错了什么?
此模式在 Solr 8.4 中运行良好
解决方案
可以在不使用嵌套文档功能的情况下处理子文档 -嵌套文档功能只是使其更容易和更自动化。
Solr 8 引入了嵌套文档- 因此尝试在 Solr 6 中使用该功能不会像您发现的那样工作。
据我所知,在早期版本中,您必须使用引用的相关字段手动进行这些更新,然后使用这些值显式应用块连接查询解析器和childdoctransformer 。
如果可以的话,请升级到 Solr 8(在最新的 dotrelease 中),因为功能工作正如您所期望的那样,而不是增加自己处理它以解决早期版本中的限制的复杂性。
推荐阅读
- excel - 如何重命名多个文件 Excel VBA
- c++ - 将字符串向量推送到lua
- python - 使用 pymupdf 提取 pdf 内容并比较字典值以用 html 标记其内容。比较字体大小和标记其内容的问题
- android - “导出加密密钥 - 应用程序包”选项是什么?
- vaadin - Vaadin 上传组件 - 文件添加事件
- docker - Elasticsearch SIEM 不工作,但 EQL 查询正常
- aws-cdk - 使用 AssetStaging 作为代码源时,每次部署时 DockerImageCode 哈希都会发生变化
- java - Spring Rest:在 RequestParam 中传递一个对象
- azure - Azure NSG,理想情况下基于源 IP 地址 PowerShell 的规则删除
- javascript - 带有 date-io 错误的日期解析格式字符串包含未转义的拉丁字母字符“g”