【问题标题】:Solr: data file is commited, but no results returned when searchingSolr:数据文件已提交,但搜索时没有返回结果
【发布时间】:2019-04-22 15:49:34
【问题描述】:

我在 docker 容器中运行了最新的 solr。我导入了一个带有数据的 json 文件(这个文件是从 solr 的旧版本 3.3 中以 json 格式导出的)。我在导入数据时没有收到任何错误。 Solr 管理员显示有 764 个文档,符合预期。

当我尝试查询数据时(例如使用*:*),我没有收到任何结果。

我正在使用带有添加字段的默认托管模式(来自旧的 schema.xml 文件)。

(注意:这里 Omeka 方面并不重要,只需要 Solr 索引和查询结果。

我在许多其他设置中都有这个工作,但这个没有创建索引或其他什么???

其他具有几乎相同设置的项目:

所有项目文件都在这里:https://github.com/scholarslab/falmouth

当我查询 *:* 时应该会得到结果

一切正常(Docker、nginx 代理、Omeka 等),所以问题在于从 Solr 查询中获取结果。

更新:2019 年 4 月 23 日

使用http://falmouth.lib.virginia.edu/solr/falmouth/select?debugQuery=on&defType=edismax&q=id:123http://falmouth.lib.virginia.edu/solr/falmouth/select?debugQuery=on&defType=edismax&df=fulltext&q=*:* 查询返回零结果。

{
  "responseHeader":{
    "status":0,
    "QTime":0,
    "params":{}},
  "response":{"numFound":0,"start":0,"docs":[]
  }}

网络管理员看起来好像没有加载架构(不确定此处的正确术语)。截图如下:

Solr web admin showing documents loaded

Solr web admin showing no fields available

Terminal showing the json post and committed without errors

【问题讨论】:

  • 当您在请求中包含debugQuery=true 时,Solr 在parsedQueryQParser 中返回什么?我怀疑您可能没有配置默认搜索字段和/或您的解析器是 DisMax(而不是 eDisMax)。
  • 文档的 uniqueKey 字段是否具有正确的值? Solr 日志是否显示文档已添加并提交numFound 属性是否在响应中显示任何内容? debugQuery=true 与查询一起显示什么? docker 容器中给 Solr 的存储是否是临时的(Solr 实际上是否能够写入存储?提交时,文档作为物理文件保存到索引中。..
  • 感谢您的反馈!使用此查询:http://falmouth.lib.virginia.edu/solr/falmouth/select?debugQuery=on&defType=edismax&df=fulltext&q=*:* 我仍然得到零结果。 uniqueKey 字段是“id”,所有这些值都是 4 位数字。在托管模式中,id 字段设置为“字符串”类型。对于其他有效的类似项目也是如此。 numFound 显示 0。Solr 能够写入 docker 容器中的存储; /opt/solr/server/solr/falmouth/data/index/中有文件。
  • 即使您仍然得到零结果,您能否使用 debugQuery=on 获得的 parsedQuery 的输出更新您的问题?
  • 另外,作为一个快速测试,如果您通过 id 发出查询会发生什么? http://falmouth.lib.virginia.edu/solr/falmouth/select?debugQuery=on&defType=edismax&q=id:123

标签: solr


【解决方案1】:

标记为已解决。

我从头开始重建 docker 容器,现在一切正常。不知道以前是什么问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-12-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-07
    • 1970-01-01
    相关资源
    最近更新 更多