【问题标题】:Solr8- stored=false fields show up in the responseSolr8-stored=false 字段显示在响应中
【发布时间】:2021-07-14 02:16:30
【问题描述】:

我有设置为“stored=false”的字段,但它们仍然显示在响应中。我检查了“useDocValuesAsStored”是否设置为 false。知道为什么这些字段会出现在响应中。

【问题讨论】:

  • 什么样的字段?即如何定义字段?在更改定义之前,您是否将任何内容索引到字段中?另请注意,useDocValuesAsStored 仅指通配符字段查询,而不是在专门请求字段时(useDocValuesAsStored="false" 时,仍可以在 fl 参数中按名称显式请求未存储的 DocValues 字段,但会不匹配全局模式 ("*")。)
  • 这是简单的字符串字段-> 字段名称="domainNames" type="string" indexed="true" stored="false" multiValued="true"。我在测试时将字段定义为 stored=true 。然后我更改并删除了数据目录。重新启动服务器。在进行数据导入之前我也做了清理。没有专门要求字段。

标签: solr solr8


【解决方案1】:

我是 solr 的新手,但是当我检查 schema.xml 文件时,我发现所有 fieldTypes 几乎都是 DocValues (docValues="true")

<fieldType name="pint" class="solr.IntPointField" docValues="true"/>
<fieldType name="pints" class="solr.IntPointField" docValues="true" multiValued="true"/>
<fieldType name="string" class="solr.StrField" sortMissingLast="true" docValues="true"/>
<fieldType name="strings" class="solr.StrField" sortMissingLast="true" docValues="true" multiValued="true"/>
<fieldType name="plong" class="solr.LongPointField" docValues="true"/>
<fieldType name="plongs" class="solr.LongPointField" docValues="true" multiValued="true"/>

您可以在 Admin UI 的架构中查看它。如果您不想在结果集中检索,请将 docValues 设置为 false。

【讨论】:

  • 非常感谢。设置 docValues="false" 有效。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2017-08-26
  • 2014-11-23
  • 2020-10-06
  • 2019-04-21
  • 1970-01-01
  • 1970-01-01
  • 2015-11-11
相关资源
最近更新 更多