弹性搜索不返回所有字段

时间:2015-07-13 09:58:49

标签: elasticsearch

我有一个索引,其名称是news,这里是elasticsearch中存储的映射:

{
   "news": {
      "mappings": {
         "newsdetail": {
            "properties": {
               "active": {
                  "type": "long"
               },
               "authorId": {
                  "type": "long"
               },
               "creationDate": {
                  "type": "date",
                  "format": "dateOptionalTime"
               },
               "iDate": {
                  "type": "string"
               },
               "iTime": {
                  "type": "string"
               },
               "isExclusive": {
                  "type": "boolean"
               },
               "itemId": {
                  "type": "long"
               },
               "languageId": {
                  "type": "long"
               },
               "lead": {
                  "type": "string"
               },
               "main": {
                  "type": "long"
               },
               "mainTitr": {
                  "type": "long"
               },
               "mediaType": {
                  "type": "long"
               },
               "newsType": {
                  "type": "long"
               },
               "pictureId": {
                  "type": "long"
               },
               "ref": {
                  "type": "string"
               },
               "subMain": {
                  "type": "long"
               },
               "subMainTitr": {
                  "type": "long"
               },
               "subtitle": {
                  "type": "string"
               },
               "text": {
                  "type": "string"
               },
               "title": {
                  "type": "string"
               },
               "video": {
                  "type": "string"
               },
               "viewCount": {
                  "type": "long"
               }
            }
         }
      }
   }
}

当我尝试搜索此索引的数据时,它返回:

{
   "took": 1,
   "timed_out": false,
   "_shards": {
      "total": 1,
      "successful": 1,
      "failed": 0
   },
   "hits": {
      "total": 69612,
      "max_score": 1,
      "hits": [
         {
            "_index": "news",
            "_type": "newsdetail",
            "_id": "AU6Gt1fK36ANCl26_meY",
            "_score": 1,
            "_source": {
               "itemId": 452,
               "pictureId": 452,
               "authorId": 1,
               "languageId": 1,
               "active": 1,
               "title": "خبر تستی",
               "main": 1,
               "mainTitr": 1,
               "subMain": 1,
               "subMainTitr": 1,
               "video": "ویدئوی تستی",
               "newsType": 3,
               "creationDate": "2014-06-09T18:38:47.203",
               "viewCount": 201,
               "isExclusive": false,
               "mediaType": 0
            }
         }
      ]
   }
}

有些领域错过了。我该怎么做才能看到整个领域。请注意,我没有选择字段,我的请求是GET news/_search?pretty=true&size=1

0 个答案:

没有答案