Vespa查询超时,部分结果

时间:2019-09-18 12:32:49

标签: vespa

如果结果集中的一个文档是一个巨大的文档(数MB),则:

  • 查询超时(看来查询速度很快-但使用summary: dynamic创建代码段超时)
  • children: [...]仅包含垃圾信息

这些解决方案之一可能吗?

  • 如果Vespa无法回答field: [...],则至少应回答文档ID,例如id: "id:post:post::12345"代替id: "index/content/0/..."
  • 只有大文档的摘要应该超时(当前所有children: [...]返回"id": "index/content/..."

示例:

{
  "root": {
    "id": "toplevel",
    "relevance": 1,
    "fields": {
      "totalCount": 60
    },
    "coverage": {
      "coverage": 100,
      "documents": 1427628,
      "full": true,
      "nodes": 2,
      "results": 2,
      "resultsFull": 2
    },
    "errors": [
      {
        "code": 12,
        "summary": "Timed out",
        "message": "timeout waiting for summaries from sc0.num0"
      }
    ],
    "children": [
      {
        "id": "index:content/0/939fc4e6c4c9576cd77a12f3",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/45ee850d113ea6e6c42f2f9f",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/b9fcf825622f9ec8c0ea4e4d",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/1e1c4a96617fa6571c3c5ce7",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/2550e74ff60e88710f1f4f26",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/d1dd0fb89cea4613132a76f6",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/92a8c4abe0e358e3dab36fbb",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/bc36fea47a7628648d89e1b0",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/804475ba69aaa691de930e10",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/0577e69b0824684948027fc3",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/1b1f1144aa80385aca9a6027",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/34f8ddeca987fe2d77069009",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/f1befbe5d773e19811790e11",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/af2e009dd5ab895b1e3f9ff1",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/862f42f5c322642198b1f267",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/6d1fb4c45beb641fe1ce17ec",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/f9797f6e747b33b992faffb3",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/6a3e15cfab492c4a428ad529",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/9eb6407921012c10deb70115",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/905360bc8da5ff1b0b452246",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/24277dd2eef4167cec1bcf8a",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/a207cf989e02b1443d662cf1",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/bae6cb8b6e9fbc1032cb1ee4",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/24b0cd6cd7251074a9dea836",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/95b0f46b8fa9d22d497b08fc",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/41d534f99d1a27f6a0d2032b",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/c13287b86341bfbddda08b3a",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/59874c4cbff45ac155da5b11",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/28a1e4e530064836716e8175",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/8ebdc951376c0a82cafee577",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/79bcd638b357820e6f8ac10d",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/866db8cd10611dbc898fe5ec",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/a1444ef7d27205b34c60ff25",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/c82d1c8b0a134413203dde58",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/29c349724f46f9c1a7448eab",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/96f0f6cb2789f521c71318ca",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/b5b8046218c23d4c08fea8a7",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/2d4f7cf4e3c8d57e8dc7b401",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/562104630c6a15a001b0718c",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/dac419d3bcc45e7422548e74",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/9a4bb96ea031b3891a7f8d12",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/9b67994ac2d440bd6ac69d19",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/a7dbbc02b8889271441dfdc4",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/acdc61985bbdc43ca5cfaf56",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/a1429d9aa68422e0384f682e",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/11b0377300156b23c5a893fa",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/6d8075a57eef79a9f7060989",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/565b12cee0eccded7f384fb1",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/93c46b96dccd2ed8e52c6ae4",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/26acfa4c314761921da624a4",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/c99f784fa9d31a93c7b72ef0",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/88099aad4415647d62d705d9",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/b80c189a7e125a17a04c703e",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/3dea2a9e7e13211c0706e846",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/f1bdfae364ff4ad2bfee6236",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/7cc8a3c625ce3a11383c6157",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/44ddd465721f9dbf66f15f64",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/53d09e41a0a488c9ceffd4d7",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/76b024d20a1a78e255420e80",
        "relevance": 0,
        "source": "content"
      },
      {
        "id": "index:content/0/a4ddfd13bd4cace8984f90dc",
        "relevance": 0,
        "source": "content"
      }
    ]
  }
}

1 个答案:

答案 0 :(得分:3)

常规:

  1. 预计为大型文档生成摘要所需的时间不会更长-有问题的文档有多大?超时之前经过了多少时间? (您可以通过在查询中添加例如&tracelevel = 5来找到时间明细。

  2. 绝对不希望代码片段包含垃圾信息,您能否举例说明您看到的内容?您确定这不是客户端问题吗?

您的具体问题:

  • ID是摘要的一部分,因此,如果摘要请求失败,则无法开箱即用地提供完整ID。如果愿意,您可以自己执行此操作,方法是将id放在另一个摘要类中,然后首先请求(从搜索者那里对不同的摘要类进行两次“填充”调用)。

  • 每个分区节点都有一个摘要请求(通常是多个ID)。当您接近超时时,有可能返回我们拥有的东西,但据我所知,我们今天不对摘要请求这样做。

无论如何,在考虑解决方法之前,让我们先找出原因,我不记得这曾经是任何应用程序的问题。建议您在https://github.com/vespa-engine/vespa/issues处创建一个问题,因为它更适合这样做。