Solr - 使用numfound>成功查询0但是返回的文档是空的?

时间:2014-09-04 04:08:34

标签: apache solr lucene solr-query-syntax

我对Solr很新,但有些东西没有按预期工作......

我正在搜索name = 'the*'的文件。由于我获得了numFound > 0,因此此查询正常运行。但即使我设置了&fl=*

,响应中的文档也是空的

我想显示响应中文档的所有可用字段。 (我也试过&fl=name,但它没有改变任何东西。

我的查询:

  

http://localhost:8983/solr/collection1/select q=name%3Athe*&rows=5&fl=*&wt=json&indent=true

回复:

{
  "responseHeader": {
    "status": 0,
    "QTime": 0,
    "params": {
      "q": "name:the*",
      "indent": "true",
      "fl": "*",
      "rows": "5",
      "wt": "json",
      "_": "1409803190693"
    }
  },
  "response": {
    "numFound": 257052,
    "start": 0,
    "docs": [
      {},
      {},
      {},
      {},
      {}
    ]
  }
}

1 个答案:

答案 0 :(得分:0)

我的问题是,在创建索引时,stored文件中的字段不是schema.xml,因此我无法访问它们(即使设置了stored attribut到true)。

相关问题